]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
staging:iio:ade7758: 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:18:42 +0000 (10:18 +0100)
commit4922fd697a573cfc519668b3013a7f8de97c4ae7
treebe5c6b0baf447f7bb1026ceffb22ac3a65727493
parentdb314a1aaa2c0aa262f24e14c81b91b09e72e470
staging:iio:ade7758: 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/meter/ade7758_core.c