drm/sysfs: testing the wrong variable in drm_sysfs_device_add()
Subsystems (3)
PATCH 1/1 drm/sysfs: testing the wrong variable in drm_sysfs_device_add()
There is a typo here so we don't check for allocation failure properly.
Fixes 760c960bd688 ('drm/sysfs: fix hotplug regression since lifetime changes')
Signed-off-by Dan Carpenter <[email protected]>
drivers/gpu/drm/drm_sysfs.c +1 -1
@@ -516,7 +516,7 @@ int drm_sysfs_device_add(struct drm_minor *minor) minor_str ="card%d" ; minor->kdev =kzalloc (sizeof (*minor->kdev),GFP_KERNEL ); -if (!minor->dev) { +if (!minor->kdev) { r = -ENOMEM ; goto error; }