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:
Antoniu Miclaus 2026-03-30 14:18:53 +03:00 committed by Jonathan Cameron
parent db935b8cac
commit a88442f408

View File

@ -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;