mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-01 09:13:37 +00:00
iio: dac: ti-dac5571: fix an error code in probe()
If we have an unexpected number of channels then return -EINVAL instead
of returning success.
Fixes: df38a4a72a ("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>
This commit is contained in:
parent
6880fa6c56
commit
f7a28df7db
1 changed files with 1 additions and 0 deletions
|
|
@ -350,6 +350,7 @@ static int dac5571_probe(struct i2c_client *client,
|
||||||
data->dac5571_pwrdwn = dac5571_pwrdwn_quad;
|
data->dac5571_pwrdwn = dac5571_pwrdwn_quad;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
ret = -EINVAL;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue