staging:iio:ad7606: fix ptr_ret.cocci warnings

drivers/staging/iio/adc/ad7606.c:357:1-3: WARNING: PTR_ERR_OR_ZERO can be used

 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

CC: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
kbuild test robot 2016-10-23 03:12:42 +08:00 committed by Jonathan Cameron
parent a84a6a8aa0
commit dbdef9ba69

View file

@ -354,10 +354,7 @@ static int ad7606_request_gpios(struct ad7606_state *st)
st->gpio_os = devm_gpiod_get_array_optional(dev, "oversampling-ratio", st->gpio_os = devm_gpiod_get_array_optional(dev, "oversampling-ratio",
GPIOD_OUT_LOW); GPIOD_OUT_LOW);
if (IS_ERR(st->gpio_os)) return PTR_ERR_OR_ZERO(st->gpio_os);
return PTR_ERR(st->gpio_os);
return 0;
} }
/** /**