Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[pandora-kernel.git] / drivers / input / touchscreen / ads7846.c
index 1c08ecc..58934a4 100644 (file)
@@ -268,13 +268,12 @@ static int ads7846_read12_ser(struct device *dev, unsigned command)
        ts->irq_disabled = 0;
        enable_irq(spi->irq);
 
        ts->irq_disabled = 0;
        enable_irq(spi->irq);
 
-       if (req->msg.status)
-               status = req->msg.status;
-
-       /* on-wire is a must-ignore bit, a BE12 value, then padding */
-       sample = be16_to_cpu(req->sample);
-       sample = sample >> 3;
-       sample &= 0x0fff;
+       if (status == 0) {
+               /* on-wire is a must-ignore bit, a BE12 value, then padding */
+               sample = be16_to_cpu(req->sample);
+               sample = sample >> 3;
+               sample &= 0x0fff;
+       }
 
        kfree(req);
        return status ? status : sample;
 
        kfree(req);
        return status ? status : sample;