summaryrefslogtreecommitdiffstats
path: root/drivers/iio/dac/ti-dac7311.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/dac/ti-dac7311.c')
-rw-r--r--drivers/iio/dac/ti-dac7311.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iio/dac/ti-dac7311.c b/drivers/iio/dac/ti-dac7311.c
index 7f89d2a52f49..6f4aa4794a0c 100644
--- a/drivers/iio/dac/ti-dac7311.c
+++ b/drivers/iio/dac/ti-dac7311.c
@@ -249,7 +249,9 @@ static int ti_dac_probe(struct spi_device *spi)
spi->mode = SPI_MODE_1;
spi->bits_per_word = 16;
- spi_setup(spi);
+ ret = spi_setup(spi);
+ if (ret < 0)
+ return dev_err_probe(dev, ret, "spi_setup failed\n");
indio_dev->info = &ti_dac_info;
indio_dev->name = spi_get_device_id(spi)->name;