From: Eddie James <eajames@linux.vnet.ibm.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Andrew Jeffery <andrew@aj.id.au>
Cc: Guenter Roeck <linux@roeck-us.net>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] fsi: occ: fix a NULL vs IS_ERR() check
Date: Mon, 26 Nov 2018 10:03:38 -0600 [thread overview]
Message-ID: <88940a85-8271-eeff-ee8d-4e7a2f3ea4cb@linux.vnet.ibm.com> (raw)
In-Reply-To: <20181126081115.hmsplacwvcdvpvxn@kili.mountain>
On 11/26/2018 02:11 AM, Dan Carpenter wrote:
> The platform_device_register_full() function doesn't return NULL, it
> returns error pointers.
>
> Fixes: 4e01f5644463 ("fsi: Add On-Chip Controller (OCC) driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks.
Reviewed-by: Eddie James <eajames@linux.ibm.com>
> ---
> 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 a2301cea1cbb..d8695f67622f 100644
> --- a/drivers/fsi/fsi-occ.c
> +++ b/drivers/fsi/fsi-occ.c
> @@ -546,7 +546,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;
prev parent reply other threads:[~2018-11-26 16:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-26 8:11 [PATCH] fsi: occ: fix a NULL vs IS_ERR() check Dan Carpenter
2018-11-26 16:03 ` Eddie James [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=88940a85-8271-eeff-ee8d-4e7a2f3ea4cb@linux.vnet.ibm.com \
--to=eajames@linux.vnet.ibm.com \
--cc=andrew@aj.id.au \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.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