mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
iio: adc: ad7266: simplify error return
Return PTR_ERR() directly instead of assigning it to an intermediate variable first. Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
3d8fedcc62
commit
b40be056ee
|
|
@ -409,10 +409,8 @@ static int ad7266_probe(struct spi_device *spi)
|
|||
st->gpios[i] = devm_gpiod_get(&spi->dev,
|
||||
ad7266_gpio_labels[i],
|
||||
GPIOD_OUT_LOW);
|
||||
if (IS_ERR(st->gpios[i])) {
|
||||
ret = PTR_ERR(st->gpios[i]);
|
||||
return ret;
|
||||
}
|
||||
if (IS_ERR(st->gpios[i]))
|
||||
return PTR_ERR(st->gpios[i]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user