All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] iio: at91: fix error return code in at91_adc_probe()
@ 2013-10-30  5:20 Wei Yongjun
  2013-11-01  8:32 ` Josh Wu
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2013-10-30  5:20 UTC (permalink / raw)
  To: jic23, grant.likely, rob.herring, maxime.ripard, josh.wu, lars,
	ludovic.desroches
  Cc: yongjun_wei, linux-iio

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

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>
---
 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;
 		}
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-02 12:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-30  5:20 [PATCH -next] iio: at91: fix error return code in at91_adc_probe() Wei Yongjun
2013-11-01  8:32 ` Josh Wu
2013-11-02 13:10   ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.