From: zhong jiang <zhongjiang@huawei.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Greg KH <gregkh@linuxfoundation.org>, <sameo@linux.intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] NFC: st-nci: remove a redundant null pointer check
Date: Wed, 26 Sep 2018 22:23:17 +0800 [thread overview]
Message-ID: <5BAB9655.6080100@huawei.com> (raw)
In-Reply-To: <20180926140311.GU15943@smile.fi.intel.com>
On 2018/9/26 22:03, Andy Shevchenko wrote:
> On Wed, Sep 26, 2018 at 08:30:50PM +0800, zhong jiang wrote:
>> The dev is impossible is NULL. hence the check is redundant. We
>> never will hit it.
>>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Thanks.
>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
>> ---
>> v1->v2:
>> - According to Greg's suggestion. just remove the null pointer will be better.
>>
>> drivers/nfc/st-nci/spi.c | 7 -------
>> 1 file changed, 7 deletions(-)
>>
>> diff --git a/drivers/nfc/st-nci/spi.c b/drivers/nfc/st-nci/spi.c
>> index 1470559..864fd90 100644
>> --- a/drivers/nfc/st-nci/spi.c
>> +++ b/drivers/nfc/st-nci/spi.c
>> @@ -233,13 +233,6 @@ static int st_nci_spi_probe(struct spi_device *dev)
>> dev_dbg(&dev->dev, "%s\n", __func__);
>> dev_dbg(&dev->dev, "IRQ: %d\n", dev->irq);
>>
>> - /* Check SPI platform functionnalities */
>> - if (!dev) {
>> - pr_debug("%s: dev is NULL. Device is not accessible.\n",
>> - __func__);
>> - return -ENODEV;
>> - }
>> -
>> phy = devm_kzalloc(&dev->dev, sizeof(struct st_nci_spi_phy),
>> GFP_KERNEL);
>> if (!phy)
>> --
>> 1.7.12.4
>>
prev parent reply other threads:[~2018-09-26 14:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-26 12:30 [PATCH v2] NFC: st-nci: remove a redundant null pointer check zhong jiang
[not found] ` <20180926140311.GU15943@smile.fi.intel.com>
2018-09-26 14:23 ` zhong jiang [this message]
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=5BAB9655.6080100@huawei.com \
--to=zhongjiang@huawei.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
/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 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.