diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-02-14 10:26:43 +0300 |
---|---|---|
committer | Anton Vorontsov <anton@enomsg.org> | 2013-02-16 13:27:09 -0800 |
commit | 64d26f225fefe06c870634e7bfe026a063e7f776 (patch) | |
tree | e4c8079771c59852d2bc4fa6752096012d385572 /drivers/rtc/rtc-pl031.c | |
parent | 049645d753e39cb64c8563faf865b0689256cf28 (diff) |
generic-adc-battery: Fix forever loop in gab_remove()
There is a forever loop calling iio_channel_release() because the
"chan < " part of the "chan < ARRAY_SIZE()" is missing. This is in both
the error handling on probe and also in the remove function.
The other thing is that it's possible for some of the elements of the
adc_bat->channel[chan] array to be an ERR_PTR(). I've changed them to be
NULL instead. We're still not allowed to pass NULLs to
iio_channel_release() so I've added a check.
Finally, I removed an unused "chan = ARRAY_SIZE(gab_chan_name);" statement
as a small cleanup.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
Diffstat (limited to 'drivers/rtc/rtc-pl031.c')
0 files changed, 0 insertions, 0 deletions