public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] drm/sysfs: testing the wrong variable in drm_sysfs_device_add()
@ 2013-11-27 22:12 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2013-11-27 22:12 UTC (permalink / raw)
  To: David Airlie; +Cc: dri-devel, kernel-janitors

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 <dan.carpenter@oracle.com>

diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index bd2bca395792..c22c3097c3e8 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -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;
 	}

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

only message in thread, other threads:[~2013-11-27 22:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-27 22:12 [patch] drm/sysfs: testing the wrong variable in drm_sysfs_device_add() Dan Carpenter

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