projects
/
wrapfs-3.14.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6969695
)
iio: dac: ti-dac5571: fix an error code in probe()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Mon, 16 Aug 2021 18:39:54 +0000
(21:39 +0300)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 20 Oct 2021 09:40:15 +0000
(11:40 +0200)
commit
f7a28df7db84eb3410e9eca37832efa5aed93338
upstream.
If we have an unexpected number of channels then return -EINVAL instead
of returning success.
Fixes: df38a4a72a3b ("iio: dac: add TI DAC5571 family support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link:
https://lore.kernel.org/r/20210816183954.GB2068@kili
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/dac/ti-dac5571.c
patch
|
blob
|
history
diff --git
a/drivers/iio/dac/ti-dac5571.c
b/drivers/iio/dac/ti-dac5571.c
index 3a2bb0efe50de0f80607cf7b8dbaa72dbd5140c6..51c41ccf00ad9fa80569ca4258d7833781bcdb56 100644
(file)
--- a/
drivers/iio/dac/ti-dac5571.c
+++ b/
drivers/iio/dac/ti-dac5571.c
@@
-352,6
+352,7
@@
static int dac5571_probe(struct i2c_client *client,
data->dac5571_pwrdwn = dac5571_pwrdwn_quad;
break;
default:
+ ret = -EINVAL;
goto err;
}