public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] Input: CMA3000 - signedness bug in cma3000_thread_irq()
@ 2011-10-13  6:42 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2011-10-13  6:42 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Paul Gortmaker, Shubhrajyoti, Sergio Aguirre, Jonathan Cameron,
	linux-input, kernel-janitors

The ->read() function returns an int; negative error codes on error
or a byte of data on success.  intr_status needs to be signed here
for the error handling to work.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/input/misc/cma3000_d0x.c b/drivers/input/misc/cma3000_d0x.c
index 80793f1..2a42b53 100644
--- a/drivers/input/misc/cma3000_d0x.c
+++ b/drivers/input/misc/cma3000_d0x.c
@@ -116,7 +116,8 @@ static irqreturn_t cma3000_thread_irq(int irq, void *dev_id)
 {
 	struct cma3000_accl_data *data = dev_id;
 	int datax, datay, dataz;
-	u8 ctrl, mode, range, intr_status;
+	u8 ctrl, mode, range;
+	int intr_status;
 
 	intr_status = CMA3000_READ(data, CMA3000_INTSTATUS, "interrupt status");
 	if (intr_status < 0)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-10-13  6:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-13  6:42 [patch] Input: CMA3000 - signedness bug in cma3000_thread_irq() Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox