Skip to content

Commit

Permalink
staging: sep: Fix sign of error
Browse files Browse the repository at this point in the history
One of our errors wasn't negative as intended. Fix this.
(Found by Hillf Danton)

While we are at it turn user causable messages down to dev_dbg level in the
ioctl paths.

Signed-off-by: Alan Cox <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Alan Cox authored and gregkh committed Apr 10, 2012
1 parent 0034102 commit fcff311
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/sep/sep_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3114,17 +3114,17 @@ static long sep_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
current->pid);
if (1 == test_bit(SEP_LEGACY_SENDMSG_DONE_OFFSET,
&call_status->status)) {
dev_warn(&sep->pdev->dev,
dev_dbg(&sep->pdev->dev,
"[PID%d] dcb prep needed before send msg\n",
current->pid);
error = -EPROTO;
goto end_function;
}

if (!arg) {
dev_warn(&sep->pdev->dev,
dev_dbg(&sep->pdev->dev,
"[PID%d] dcb null arg\n", current->pid);
error = EINVAL;
error = -EINVAL;
goto end_function;
}

Expand Down

0 comments on commit fcff311

Please sign in to comment.