summaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc/Makefile
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-04-30 22:05:00 +0100
committerJonathan Cameron <jic23@kernel.org>2014-05-03 11:14:01 +0100
commit82a5803c782417754bdebb8dfa34edc62c0d8bbc (patch)
tree6a4313bfd68288928201061539f0052777b57eb3 /drivers/iio/adc/Makefile
parentfd8122d12858132aa9684f2b979107a1f4bba139 (diff)
downloadblackbird-op-linux-82a5803c782417754bdebb8dfa34edc62c0d8bbc.tar.gz
blackbird-op-linux-82a5803c782417754bdebb8dfa34edc62c0d8bbc.zip
staging: iio: ad799x: remove some unneeded IS_ERR() checks
My static checker is upset that we check IS_ERR(t->reg) when we know it is not an ERR_PTR. Checking for IS_ERR() twice is often a sign of confusion and buggy code. In this case, if the call to "ret = regulator_enable(st->vref);" fails, then we call "regulator_disable(st->vref);" and that's a mistake because "st->vref" is not enabled. I fixed these problems and Hartmut Knaack pointed out a couple unneeded IS_ERR() checks in ad799x_remove() so I have removed those as well. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/adc/Makefile')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud