Title: [8947] trunk/drivers/input/touchscreen/ad7160-raw.c: [#6066] AD7160 Linux Driver Support:
- Revision
- 8947
- Author
- hennerich
- Date
- 2010-06-25 05:17:34 -0400 (Fri, 25 Jun 2010)
Log Message
[#6066] AD7160 Linux Driver Support:
Since we don't exit probe in case the raw interface fails.
Make sure we only remove the raw interface in case it exists.
Modified Paths
Diff
Modified: trunk/drivers/input/touchscreen/ad7160-raw.c (8946 => 8947)
--- trunk/drivers/input/touchscreen/ad7160-raw.c 2010-06-25 09:12:30 UTC (rev 8946)
+++ trunk/drivers/input/touchscreen/ad7160-raw.c 2010-06-25 09:17:34 UTC (rev 8947)
@@ -311,10 +311,11 @@
__devexit int ad7160_remove_raw(struct device *dev)
{
- misc_deregister(&ad7160_raw_misc_device);
- kfifo_free(&ad7160_raw_device.fifo);
- kfree(ad7160_raw_device.buffer);
- ad7160_raw_device.dev = NULL;
-
+ if (ad7160_raw_device.dev) {
+ misc_deregister(&ad7160_raw_misc_device);
+ kfifo_free(&ad7160_raw_device.fifo);
+ kfree(ad7160_raw_device.buffer);
+ ad7160_raw_device.dev = NULL;
+ }
return 0;
}
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits