Skip to contentSkip to conversation

sep: Fix sign of error return

PATCH RESEND In review Alan Cox 2 participants 2 messages Apr 10, 2012 Staging

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH RESEND 1/1 sep: Fix sign of error return

From: Alan Cox <[email protected]>

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.

---

 drivers/staging/sep/sep_main.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/sep/sep_main.c +3 -3
index ad54c2e..f1701bc 100644
@@ -3114,7 +3114,7 @@ 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;
@@ -3122,9 +3122,9 @@ static long sep_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 		}
 
 		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;
 		}
 
#1 lore raw
Quoted 5 lines · Alan Cox

From: Alan Cox <[email protected]>

One of our errors wasn't negative as intended. Fix this. (Found by Hillf Danton)

Quoted 8 lines

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

---

 drivers/staging/sep/sep_main.c |    6 +++---

Sorry for the delay, it's in my "to-apply" queue which I should get to by the end of today, been digging out from the accumulated patch backlog all yesterday and today.

greg k-h