From: tangbin <tangbin@cmss.chinamobile.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org,
knaack.h@gmx.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org,
linux-iio@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: iio: cdc: ad7746: Fix unnecessary check andassignment in ad7746_probe()
Date: Tue, 18 May 2021 17:27:07 +0800 [thread overview]
Message-ID: <dfb7d829-94e6-2051-8795-79402160afdb@cmss.chinamobile.com> (raw)
In-Reply-To: <20210518075254.GN1955@kadam>
Hi Dan:
On 2021/5/18 15:52, Dan Carpenter wrote:
> On Mon, May 17, 2021 at 11:00:06PM +0800, Tang Bin wrote:
>> @@ -730,11 +730,7 @@ static int ad7746_probe(struct i2c_client *client,
>> if (ret < 0)
>> return ret;
>>
>> - ret = devm_iio_device_register(indio_dev->dev.parent, indio_dev);
>> - if (ret)
>> - return ret;
>> -
>> - return 0;
>> + return devm_iio_device_register(indio_dev->dev.parent, indio_dev);
>> }
> This sort of thing is done deliberately as a style choice... I probably
> wouldn't have written it that way myself, but there really isn't a
> downside to leaving it as-is.
>
> The unused "int ret = 0;" just introduces a static checker warning about
> unused assignments and disables the static checker warning for
> uninitialized variables so we want to remove that.
>
Got it, I will send this patch for you.
Thanks
Tang Bin
next prev parent reply other threads:[~2021-05-18 9:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-17 15:00 [PATCH] staging: iio: cdc: ad7746: Fix unnecessary check and assignment in ad7746_probe() Tang Bin
2021-05-17 22:14 ` Marcelo Schmitt
2021-05-18 3:19 ` [PATCH] staging: iio: cdc: ad7746: Fix unnecessary check andassignment " tangbin
2021-05-18 7:52 ` [PATCH] staging: iio: cdc: ad7746: Fix unnecessary check and assignment " Dan Carpenter
2021-05-18 9:27 ` tangbin [this message]
2021-05-18 17:59 ` [PATCH] staging: iio: cdc: ad7746: Fix unnecessary check andassignment " Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dfb7d829-94e6-2051-8795-79402160afdb@cmss.chinamobile.com \
--to=tangbin@cmss.chinamobile.com \
--cc=Michael.Hennerich@analog.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).