]> git.baikalelectronics.ru Git - kernel.git/commit
iio: dac: ti-dac5571: fix an error code in probe()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 16 Aug 2021 18:39:54 +0000 (21:39 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Oct 2021 09:40:15 +0000 (11:40 +0200)
commit107f91964a30d42d8f7db4469faeeb61432a2cc6
tree496475438be6e80d14e804cdb5d65b5e1c921e12
parentd7fab13b93b2382c59df71ee7c6557f357591c29
iio: dac: ti-dac5571: fix an error code in probe()

commit f7a28df7db84eb3410e9eca37832efa5aed93338 upstream.

If we have an unexpected number of channels then return -EINVAL instead
of returning success.

Fixes: 27587c900b6e ("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