]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
staging:iio:adis16200: Do not return a error in remove function
authorLars-Peter Clausen <lars@metafoo.de>
Sat, 22 Sep 2012 08:56:00 +0000 (09:56 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 22 Sep 2012 09:17:17 +0000 (10:17 +0100)
commitbea3e8a31f42269318378461ee2663b17957b165
tree3ae3bfb6312058d021f3d83bd3c163c0bd064903
parent3183bac16f537503eb3177773781d6d3059ad7b1
staging:iio:adis16200: Do not return a error in remove function

In the Linux device driver model the remove callback is not allowed to fail and
the device will be removed regardless of the return value of the remove
callback. So if we abort in the remove function and do not free all resources we
will create a resource leak. Also all kinds of undefined behaviour are expected
to happen since the IIO device is still there while its parent is already gone.

The error which the driver tries to handle in the remove function is
non-critical, so we can just ignore it and continue to free all resources and
remove the IIO device.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/gyro/adis16260_core.c