staging:iio:ad7606: fix ptr_ret.cocci warnings
[muen/linux.git] / drivers / staging / iio / adc / ad7606.c
index b0ae04a449eaf92fda0f568803534b247af3e71f..453190864b2ffc60b9b7515ce55ee53f2ad1c11e 100644 (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",
                        GPIOD_OUT_LOW);
-       if (IS_ERR(st->gpio_os))
-               return PTR_ERR(st->gpio_os);
-
-       return 0;
+       return PTR_ERR_OR_ZERO(st->gpio_os);
 }
 
 /**