From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B34EBC43460 for ; Thu, 13 May 2021 16:02:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 859E0613B6 for ; Thu, 13 May 2021 16:02:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234988AbhEMQDu (ORCPT ); Thu, 13 May 2021 12:03:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:49762 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234922AbhEMQDi (ORCPT ); Thu, 13 May 2021 12:03:38 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ED232613BC; Thu, 13 May 2021 16:02:25 +0000 (UTC) Date: Thu, 13 May 2021 17:03:34 +0100 From: Jonathan Cameron To: Tang Bin Cc: lars@metafoo.de, Michael.Hennerich@analog.com, knaack.h@gmx.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Zhang Shengju Subject: Re: [PATCH] iio:adc:ad7766: Fix unnecessary check in ad7766_probe() Message-ID: <20210513170334.479953d3@jic23-huawei> In-Reply-To: <20210511134739.948-1-tangbin@cmss.chinamobile.com> References: <20210511134739.948-1-tangbin@cmss.chinamobile.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Tue, 11 May 2021 21:47:39 +0800 Tang Bin wrote: > In the function ad7766_probe(), the return value of > devm_iio_device_register() can be zero or ret, Thus it > is unnecessary to repeated check here. > > Signed-off-by: Zhang Shengju > Signed-off-by: Tang Bin Hi Tang Bin, A quick query on this sign off sequence as I'd like to check what the intended meaning is. If you both developed this patch, please use the Co-developed-by: tag to indicate that. If Zhang Shengju wrote the patch then you sent it upstream, please fix the 'from' field on the email to reflect that. Patch itself is good. Thanks, Jonathan > --- > drivers/iio/adc/ad7766.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/iio/adc/ad7766.c b/drivers/iio/adc/ad7766.c > index b6b6765be..acf56e987 100644 > --- a/drivers/iio/adc/ad7766.c > +++ b/drivers/iio/adc/ad7766.c > @@ -291,10 +291,7 @@ static int ad7766_probe(struct spi_device *spi) > if (ret) > return ret; > > - ret = devm_iio_device_register(&spi->dev, indio_dev); > - if (ret) > - return ret; > - return 0; > + return devm_iio_device_register(&spi->dev, indio_dev); > } > > static const struct spi_device_id ad7766_id[] = {