linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-gpio@vger.kernel.org, vaibhaavram.tl@microchip.com,
	kumaravel.thiagarajan@microchip.com, arnd@arndb.de,
	tharunkumar.pasumarthi@microchip.com
Subject: Re: [PATCH -next v2] misc: microchip: pci1xxxx: fix return value in pci1xxxx_otp_eeprom_probe()
Date: Sat, 12 Aug 2023 12:59:59 +0200	[thread overview]
Message-ID: <2023081243-brush-swear-e40c@gregkh> (raw)
In-Reply-To: <20230808122453.556632-1-yangyingliang@huawei.com>

On Tue, Aug 08, 2023 at 08:24:53PM +0800, Yang Yingliang wrote:
> devm_nvmem_register() never returns NULL pointer, it will return
> ERR_PTR() when it fails, so replace the check with IS_ERR() and
> use PTR_ERR() as return code.
> 
> Fixes: 9ab5465349c0 ("misc: microchip: pci1xxxx: Add support to read and write into PCI1XXXX EEPROM via NVMEM sysfs")
> Fixes: 0969001569e4 ("misc: microchip: pci1xxxx: Add support to read and write into PCI1XXXX OTP via NVMEM sysfs")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> v1 -> v2:
>   Use PTR_ERR_OR_ZERO().

Dan sent the same thing right before you did, sorry:
	https://lore.kernel.org/r/043df330-222b-4c2c-ae19-ed2f731bfe0b@moroto.mountain


      parent reply	other threads:[~2023-08-12 11:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08 12:24 [PATCH -next v2] misc: microchip: pci1xxxx: fix return value in pci1xxxx_otp_eeprom_probe() Yang Yingliang
2023-08-09  9:04 ` Kumaravel.Thiagarajan
2023-08-12 10:59 ` Greg KH [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=2023081243-brush-swear-e40c@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=kumaravel.thiagarajan@microchip.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=tharunkumar.pasumarthi@microchip.com \
    --cc=vaibhaavram.tl@microchip.com \
    --cc=yangyingliang@huawei.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 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).