dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/nouveau/hwmon: fix use of integer as a pointer
@ 2019-10-15 14:11 Ben Dooks
  0 siblings, 0 replies; only message in thread
From: Ben Dooks @ 2019-10-15 14:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ben Dooks, Ben Skeggs, David Airlie, Daniel Vetter, dri-devel,
	nouveau, linux-kernel

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

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
index d445c6f3fece..1c3104d20571 100644
--- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
@@ -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);
-- 
2.23.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-15 14:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-15 14:11 [PATCH] drm/nouveau/hwmon: fix use of integer as a pointer Ben Dooks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox