[PATCH] drm/sysfs: fix OOM verification

David Herrmann dh.herrmann at gmail.com
Tue Nov 26 03:50:50 PST 2013


Copy/Paste typo.. we need to test for ->kdev instead of ->dev.

Reported-by: Juha Leppänen <juha_efku at dnainternet.net>
Signed-off-by: David Herrmann <dh.herrmann at gmail.com>
---
 drivers/gpu/drm/drm_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index bd2bca3..c22c309 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;
 	}
-- 
1.8.4.2



More information about the dri-devel mailing list