diff options
Diffstat (limited to 'drivers/iio/dac/ad5449.c')
-rw-r--r-- | drivers/iio/dac/ad5449.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/iio/dac/ad5449.c b/drivers/iio/dac/ad5449.c index 5b43030fe6e3..0ee6f8eeba8d 100644 --- a/drivers/iio/dac/ad5449.c +++ b/drivers/iio/dac/ad5449.c | |||
@@ -124,12 +124,13 @@ static int ad5449_read(struct iio_dev *indio_dev, unsigned int addr, | |||
124 | 124 | ||
125 | ret = spi_sync(st->spi, &msg); | 125 | ret = spi_sync(st->spi, &msg); |
126 | if (ret < 0) | 126 | if (ret < 0) |
127 | return ret; | 127 | goto out_unlock; |
128 | 128 | ||
129 | *val = be16_to_cpu(st->data[1]); | 129 | *val = be16_to_cpu(st->data[1]); |
130 | mutex_unlock(&indio_dev->mlock); | ||
131 | 130 | ||
132 | return 0; | 131 | out_unlock: |
132 | mutex_unlock(&indio_dev->mlock); | ||
133 | return ret; | ||
133 | } | 134 | } |
134 | 135 | ||
135 | static int ad5449_read_raw(struct iio_dev *indio_dev, | 136 | static int ad5449_read_raw(struct iio_dev *indio_dev, |