All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] sep: Fix sign of error return
@ 2012-04-10 13:21 Alan Cox
  2012-04-10 14:34 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2012-04-10 13:21 UTC (permalink / raw)
  To: greg, torvalds, linux-kernel

From: Alan Cox <alan@linux.intel.com>

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 <alan@linux.intel.com>
Cc: stable@kernel.org
---

 drivers/staging/sep/sep_main.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/drivers/staging/sep/sep_main.c b/drivers/staging/sep/sep_main.c
index ad54c2e..f1701bc 100644
--- a/drivers/staging/sep/sep_main.c
+++ b/drivers/staging/sep/sep_main.c
@@ -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;
 		}
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH RESEND] sep: Fix sign of error return
  2012-04-10 13:21 [PATCH RESEND] sep: Fix sign of error return Alan Cox
@ 2012-04-10 14:34 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2012-04-10 14:34 UTC (permalink / raw)
  To: Alan Cox; +Cc: torvalds, linux-kernel

On Tue, Apr 10, 2012 at 02:21:24PM +0100, Alan Cox wrote:
> From: Alan Cox <alan@linux.intel.com>
> 
> 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 <alan@linux.intel.com>
> Cc: stable@kernel.org
> ---
> 
>  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-10 14:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-10 13:21 [PATCH RESEND] sep: Fix sign of error return Alan Cox
2012-04-10 14:34 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.