summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2013-11-26 12:50:50 +0100
committerDave Airlie <airlied@redhat.com>2013-11-28 14:35:23 +1000
commita1f84f57f9f7a5060f17482fc26b39174ecb7a28 (patch)
tree102bc8ad0121a8475f1f040d0d376df6487323b9
parent8ae516aa8b8161254d3e402b3348b2a9b8d1efd0 (diff)
drm/sysfs: fix OOM verification
Copy/Paste typo.. we need to test for ->kdev instead of ->dev. Reported-by: Juha Leppänen <juha_efku@dnainternet.net> Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/drm_sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index bd2bca39579..c22c3097c3e 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;
}