Skip to content

Commit

Permalink
Input: cma3000_d0x - fix signedness bug in cma3000_thread_irq()
Browse files Browse the repository at this point in the history
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 <xi.wang@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Xi Wang authored and Dmitry Torokhov committed Dec 12, 2011
1 parent 0d0e306 commit 3a7f8fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/input/misc/cma3000_d0x.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ static void decode_mg(struct cma3000_accl_data *data, int *datax,
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;
int datax, datay, dataz, intr_status;
u8 ctrl, mode, range;

intr_status = CMA3000_READ(data, CMA3000_INTSTATUS, "interrupt status");
if (intr_status < 0)
Expand Down

0 comments on commit 3a7f8fb

Please sign in to comment.