Skip to contentSkip to conversation

drm/nouveau/hwmon: fix use of integer as a pointer

PATCH New Ben Dooks 1 participant 1 message Oct 15, 2019

Subsystems (3)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 drm/nouveau/hwmon: fix use of integer as a pointer

The special_groups[] in nouveau_hwmon_init() is an array of pointers, so use NULL instead of '0' as the initialiser.

Fixes the following sparse warning:

drivers/gpu/drm/nouveau/nouveau_hwmon.c:744:29: warning: Using plain integer as NULL pointer

---
Cc: Ben Skeggs <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_hwmon.c +1 -1
index d445c6f3fece..1c3104d20571 100644
@@ -741,7 +741,7 @@ nouveau_hwmon_init(struct drm_device *dev)
 			special_groups[i++] = &pwm_fan_sensor_group;
 	}
 
-	special_groups[i] = 0;
+	special_groups[i] = NULL;
 	hwmon_dev = hwmon_device_register_with_info(dev->dev, "nouveau", dev,
 							&nouveau_chip_info,
 							special_groups);
Signature · 1 line
2.23.0