lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 26 Sep 2018 22:23:17 +0800
From:   zhong jiang <zhongjiang@...wei.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Greg KH <gregkh@...uxfoundation.org>, <sameo@...ux.intel.com>
CC:     LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] NFC: st-nci: remove a redundant null pointer check

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@...ux.intel.com>
Thanks.
>> Signed-off-by: zhong jiang <zhongjiang@...wei.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
>>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ