Skip to content

Commit 8537e96

Browse files
SinkFindergregkh
authored andcommitted
staging: iio: cdc: fix improper return value
[ Upstream commit 91ca1a8c584f55857b1f6ab20a1d3a1ce7a559bb ] At the end of function ad7150_write_event_config(), directly returns 0. As a result, the errors will be ignored by the callers. It may be better to return variable "ret". Signed-off-by: Pan Bian <bianpan2016@163.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 266913b commit 8537e96

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/staging/iio/cdc/ad7150.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ static int ad7150_write_event_config(struct iio_dev *indio_dev,
272272
error_ret:
273273
mutex_unlock(&chip->state_lock);
274274

275-
return 0;
275+
return ret;
276276
}
277277

278278
static int ad7150_read_event_value(struct iio_dev *indio_dev,

0 commit comments

Comments
 (0)