[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181126081115.hmsplacwvcdvpvxn@kili.mountain>
Date: Mon, 26 Nov 2018 11:11:15 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Andrew Jeffery <andrew@...id.au>,
Eddie James <eajames@...ux.vnet.ibm.com>
Cc: Guenter Roeck <linux@...ck-us.net>,
Andrew Jeffery <andrew@...id.au>, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [PATCH] fsi: occ: fix a NULL vs IS_ERR() check
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>
---
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;
--
2.11.0
Powered by blists - more mailing lists