Skip to contentSkip to conversation

hwmon: corsair-psu: fix plain integer used as NULL pointer

PATCH Applied Wilken Gottwalt 2 participants 2 messages Nov 13, 2021 – Nov 14, 2021

Subsystems (2)
lore
Share & tools
lore

Wilken Gottwalt

author maintainer
#0 lore raw

PATCH 1/1 hwmon: corsair-psu: fix plain integer used as NULL pointer

sparse warnings: (new ones prefixed by >>)

Quoted 1 line
Quoted 1 line

drivers/hwmon/corsair-psu.c:536:82: sparse: sparse: Using plain

integer as NULL pointer

Fixes d115b51e0e56 ("hwmon: add Corsair PSU HID controller driver")
---
 drivers/hwmon/corsair-psu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/corsair-psu.c +1 -1
index 731d5117f9f1..14389fd7afb8 100644
@@ -729,7 +729,7 @@ static int corsairpsu_probe(struct hid_device *hdev, const struct hid_device_id
 	corsairpsu_check_cmd_support(priv);
 
 	priv->hwmon_dev = hwmon_device_register_with_info(&hdev->dev, "corsairpsu", priv,
-							  &corsairpsu_chip_info, 0);
+							  &corsairpsu_chip_info, NULL);
 
 	if (IS_ERR(priv->hwmon_dev)) {
 		ret = PTR_ERR(priv->hwmon_dev);
Signature · 1 line
2.33.1
maintainer Applied
#1 lore raw
Quoted 7 lines · Wilken Gottwalt

sparse warnings: (new ones prefixed by >>)

Quoted 1 line
Quoted 1 line

drivers/hwmon/corsair-psu.c:536:82: sparse: sparse: Using plain

integer as NULL pointer

Fixes d115b51e0e56 ("hwmon: add Corsair PSU HID controller driver")

Applied.

Thanks,
Guenter

Quoted 17 lines
---
 drivers/hwmon/corsair-psu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/corsair-psu.c +1 -1
index 731d5117f9f1..14389fd7afb8 100644
@@ -729,7 +729,7 @@ static int corsairpsu_probe(struct hid_device *hdev, const struct hid_device_id
 	corsairpsu_check_cmd_support(priv);
 
 	priv->hwmon_dev = hwmon_device_register_with_info(&hdev->dev, "corsairpsu", priv,
-							  &corsairpsu_chip_info, 0);
+							  &corsairpsu_chip_info, NULL);
 
 	if (IS_ERR(priv->hwmon_dev)) {
 		ret = PTR_ERR(priv->hwmon_dev);