From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nasmtp01.atmel.com ([192.199.1.246]:65295 "EHLO DVREDG02.corp.atmel.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751778Ab3KAIcq (ORCPT ); Fri, 1 Nov 2013 04:32:46 -0400 Message-ID: <5273670D.7070705@atmel.com> Date: Fri, 1 Nov 2013 16:32:13 +0800 From: Josh Wu MIME-Version: 1.0 To: Wei Yongjun , , , , , , CC: , Subject: Re: [PATCH -next] iio: at91: fix error return code in at91_adc_probe() References: In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Sender: linux-iio-owner@vger.kernel.org List-Id: linux-iio@vger.kernel.org Hi, Yongjun On 10/30/2013 1:20 PM, Wei Yongjun wrote: > From: Wei Yongjun > > 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 Thanks and Acked-by: Josh Wu 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; > } > >