Input: ad7879 - pass up error codes from probe functions
authorMichael Hennerich <michael.hennerich@analog.com>
Tue, 6 Oct 2009 04:43:43 +0000 (21:43 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 6 Oct 2009 05:00:21 +0000 (22:00 -0700)
If the sub-probe functions fail, we need to pass up the error code to the
higher levels from the probe function.  We currently always return 0 even
if there was an error so higher levels don't report problems.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/touchscreen/ad7879.c

index 806464177e02874ad8f6e82fb286c9287ab35092..b965101074ecd34b1baaf42d8bb097f41b569921 100644 (file)
@@ -645,7 +645,7 @@ static int __devinit ad7879_probe(struct spi_device *spi)
                kfree(ts);
        }
 
-       return 0;
+       return error;
 }
 
 static int __devexit ad7879_remove(struct spi_device *spi)
@@ -732,7 +732,7 @@ static int __devinit ad7879_probe(struct i2c_client *client,
                kfree(ts);
        }
 
-       return 0;
+       return error;
 }
 
 static int __devexit ad7879_remove(struct i2c_client *client)