Skip to content

Commit

Permalink
iio: at91: fix error return code in at91_adc_probe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Jonathan Cameron committed Nov 2, 2013
1 parent ed5d6ca commit 00582bf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/iio/adc/at91_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 00582bf

Please sign in to comment.