diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-10-30 06:20:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-11-02 13:07:54 +0100 |
commit | 00582bf8e7ed30aadbd935e430143fa18f316f8d (patch) | |
tree | d45be8b365c6c538f74764fe8bf2f430e3d17090 | |
parent | staging: drm/imx: fix return value check in ipu_add_subdevice_pdata() (diff) | |
download | linux-00582bf8e7ed30aadbd935e430143fa18f316f8d.tar.xz linux-00582bf8e7ed30aadbd935e430143fa18f316f8d.zip |
iio: at91: fix error return code in at91_adc_probe()
Fix to return -ENODEV instead of 0 if non-TSMR adc don't
support, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | drivers/iio/adc/at91_adc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c index 17df74908db1..5b1aa027c034 100644 --- a/drivers/iio/adc/at91_adc.c +++ b/drivers/iio/adc/at91_adc.c @@ -1047,6 +1047,7 @@ static int at91_adc_probe(struct platform_device *pdev) } else { if (!st->caps->has_tsmr) { dev_err(&pdev->dev, "We don't support non-TSMR adc\n"); + ret = -ENODEV; goto error_disable_adc_clk; } |