From: Eddie James <eajames@linux.ibm.com>
To: Xu Wang <vulab@iscas.ac.cn>,
jk@ozlabs.org, joel@jms.id.au, alistair@popple.id.au,
linux-fsi@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fsi: fsi-occ: fix return value check in occ_probe()
Date: Mon, 13 Jul 2020 09:21:41 -0500 [thread overview]
Message-ID: <f2a70c79-15c4-339a-92c5-173d9303dc30@linux.ibm.com> (raw)
In-Reply-To: <20200713033313.21487-1-vulab@iscas.ac.cn>
On 7/12/20 10:33 PM, Xu Wang wrote:
> In case of error, the function platform_device_register_full()
> returns ERR_PTR() and never returns NULL. The NULL test in the
> return value check should be replaced with IS_ERR().
Thanks,
Reviewed-by: Eddie James <eajames@linux.ibm.com>
>
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
> ---
> drivers/fsi/fsi-occ.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/fsi/fsi-occ.c b/drivers/fsi/fsi-occ.c
> index 7da9c81759ac..9eeb856c8905 100644
> --- a/drivers/fsi/fsi-occ.c
> +++ b/drivers/fsi/fsi-occ.c
> @@ -555,7 +555,7 @@ static int occ_probe(struct platform_device *pdev)
>
> hwmon_dev_info.id = occ->idx;
> hwmon_dev = platform_device_register_full(&hwmon_dev_info);
> - if (!hwmon_dev)
> + if (IS_ERR(hwmon_dev))
> dev_warn(dev, "failed to create hwmon device\n");
>
> return 0;
next prev parent reply other threads:[~2020-07-13 14:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-13 3:33 Xu Wang
2020-07-13 14:21 ` Eddie James [this message]
2020-07-20 14:44 ` Guenter Roeck
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=f2a70c79-15c4-339a-92c5-173d9303dc30@linux.ibm.com \
--to=eajames@linux.ibm.com \
--cc=alistair@popple.id.au \
--cc=jk@ozlabs.org \
--cc=joel@jms.id.au \
--cc=linux-fsi@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vulab@iscas.ac.cn \
/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
all inboxes | Powered by JetHome®