Input: CMA3000 - signedness bug in cma3000_thread_irq()
Subsystems (3)
PATCH 1/1 Input: CMA3000 - signedness bug in cma3000_thread_irq()
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 <[email protected]>
drivers/input/misc/cma3000_d0x.c +2 -1
@@ -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 )