Re: [PATCH 1/1] Input/Touchscreen Driver: add support AD7877touchscreen driver

From
Bryan Wu <cooloney@kernel.org>
Date
2008-05-12 06:34:08
Also in
lkml
Reply to
Hennerich, Michael, 2008-04-08
On Wed, Apr 9, 2008 at 1:13 AM, Hennerich, Michael
[off-list ref] wrote:
quoted
-----Original Message-----
From: Dmitry Torokhov [mailto:dmitry.torokhov@gmail.com]
Sent: Montag, 7. April 2008 22:16
To: Bryan Wu
Cc: <redacted>; <redacted>; Michael
Hennerich
Subject: Re: [PATCH 1/1] Input/Touchscreen Driver: add support
AD7877touchscreen driver

Hi Bryan, Michael,

On Thu, Feb 14, 2008 at 05:17:28PM +0800, Bryan Wu wrote:
quoted
From: Michael Hennerich <michael.hennerich@analog.com>

[try #3] Changlog (Add feedback from Dmitry Torokhov):
 - Change handling of spi_sync / spi_async return value handling
 - Remove depreciated dev->power.power_state
 - Fix error return path in ad7877_probe
 - delete pending kernel timer
 - Some minor cleanup (indention, use dev_err etc.)
Sorry for the long silence... I have a couple of comments at the moment
but I am sure i will have more ;)
quoted
+
+    status = spi_sync(spi, &req->msg);
+
+    if (status == 0)
+            status = req->msg.status;
+
+    kfree(req);
+    return status ? status : req->sample;
Use after free here.
Yeah this is definitely broken.
quoted
quoted
+
+    ts->irq_disabled = 1;
+    disable_irq(spi->irq);
I am a bit uneasy here... do we need to wait for an async spi
completion
quoted
here before proceeding? Overall I have some concerns about the
irq/spi/removal/sysfs iteractions, I will need some more time to look
through the driver.

I think you are right - let me come up with a patch.

Thanks and best regards,
Michael
quoted
Hi Dmitry,

Sorry for no updates, I forget to send out that patch, although
Michael fixed the driver as your review.

So need I send out one updated patch including Michael's fixing or
just send out his incremental patch?

Thanks
-Bryan
Thread (5 messages) 5 messages, 4 authors, last reply 2008-05-12
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help