DORMANTno replies

[patch] Input: CMA3000 - signedness bug in cma3000_thread_irq()

From: Dan Carpenter <hidden>
Date: 2011-10-13 06:43:16
Also in: kernel-janitors
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, the rest · Maintainers: Dmitry Torokhov, Linus Torvalds

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 <redacted>
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)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help