From: Dan Carpenter <dan.carpenter@oracle.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
Shubhrajyoti <Shubhrajyoti@ti.com>,
Sergio Aguirre <saaguirre@ti.com>,
Jonathan Cameron <jic23@cam.ac.uk>,
linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] Input: CMA3000 - signedness bug in cma3000_thread_irq()
Date: Thu, 13 Oct 2011 06:42:57 +0000 [thread overview]
Message-ID: <20111013064257.GA11651@elgon.mountain> (raw)
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)
reply other threads:[~2011-10-13 6:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111013064257.GA11651@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=Shubhrajyoti@ti.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jic23@cam.ac.uk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=saaguirre@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox