mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
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>
This commit is contained in:
parent
ed5d6ca003
commit
00582bf8e7
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue