Commit da2d5449 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Jonathan Cameron

iio: sca3000: Handle errors returned by 'sca3000_configure_ring()' in 'sca3000_probe()'

'sca3000_configure_ring()' can fail, so test its return value and
propagate it if needed.
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 4a5b4538
......@@ -1481,7 +1481,9 @@ static int sca3000_probe(struct spi_device *spi)
}
indio_dev->modes = INDIO_DIRECT_MODE;
sca3000_configure_ring(indio_dev);
ret = sca3000_configure_ring(indio_dev);
if (ret)
return ret;
if (spi->irq) {
ret = request_threaded_irq(spi->irq,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment