Skip to content

Commit 3a7f8fb

Browse files
xiwdtor
authored andcommitted
Input: cma3000_d0x - fix signedness bug in cma3000_thread_irq()
The error check (intr_status < 0) didn't work because intr_status is a u8. Change its type to signed int. Signed-off-by: Xi Wang <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 0d0e306 commit 3a7f8fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/input/misc/cma3000_d0x.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ static void decode_mg(struct cma3000_accl_data *data, int *datax,
114114
static irqreturn_t cma3000_thread_irq(int irq, void *dev_id)
115115
{
116116
struct cma3000_accl_data *data = dev_id;
117-
int datax, datay, dataz;
118-
u8 ctrl, mode, range, intr_status;
117+
int datax, datay, dataz, intr_status;
118+
u8 ctrl, mode, range;
119119

120120
intr_status = CMA3000_READ(data, CMA3000_INTSTATUS, "interrupt status");
121121
if (intr_status < 0)

0 commit comments

Comments
 (0)