Commit 00582bf8 authored by Wei Yongjun's avatar Wei Yongjun Committed by Jonathan Cameron

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: default avatarJosh Wu <josh.wu@atmel.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent ed5d6ca0
...@@ -1047,6 +1047,7 @@ static int at91_adc_probe(struct platform_device *pdev) ...@@ -1047,6 +1047,7 @@ static int at91_adc_probe(struct platform_device *pdev)
} else { } else {
if (!st->caps->has_tsmr) { if (!st->caps->has_tsmr) {
dev_err(&pdev->dev, "We don't support non-TSMR adc\n"); dev_err(&pdev->dev, "We don't support non-TSMR adc\n");
ret = -ENODEV;
goto error_disable_adc_clk; goto error_disable_adc_clk;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment