mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
iio: adc: ad7280a: use dev_err_probe()
Use dev_err_probe() instead of dev_err() in the probe path to ensure proper handling of deferred probing and to simplify error handling. Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
db935b8cac
commit
a88442f408
|
|
@ -990,8 +990,8 @@ static int ad7280_probe(struct spi_device *spi)
|
|||
st->acquisition_time = AD7280A_CTRL_LB_ACQ_TIME_1600ns;
|
||||
break;
|
||||
default:
|
||||
dev_err(dev, "Firmware provided acquisition time is invalid\n");
|
||||
return -EINVAL;
|
||||
return dev_err_probe(dev, -EINVAL,
|
||||
"Firmware provided acquisition time is invalid\n");
|
||||
}
|
||||
} else {
|
||||
st->acquisition_time = AD7280A_CTRL_LB_ACQ_TIME_400ns;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user