[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <88940a85-8271-eeff-ee8d-4e7a2f3ea4cb@linux.vnet.ibm.com>
Date: Mon, 26 Nov 2018 10:03:38 -0600
From: Eddie James <eajames@...ux.vnet.ibm.com>
To: Dan Carpenter <dan.carpenter@...cle.com>,
Andrew Jeffery <andrew@...id.au>
Cc: Guenter Roeck <linux@...ck-us.net>, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] fsi: occ: fix a NULL vs IS_ERR() check
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@...cle.com>
Thanks.
Reviewed-by: Eddie James <eajames@...ux.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;
Powered by blists - more mailing lists