Re: [PATCH -next] iio: at91: fix error return code in at91_adc_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Yongjun

On 10/30/2013 1:20 PM, Wei Yongjun wrote:
From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxxxx>

Thanks and
Acked-by: Josh Wu <josh.wu@xxxxxxxxx>

Best Regards,
Josh Wu

---
  drivers/iio/adc/at91_adc.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
index 17df749..5b1aa02 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;
  		}

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux