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>
This commit is contained in:
David Herrmann 2013-11-26 12:50:50 +01:00 committed by Dave Airlie
parent 8ae516aa8b
commit a1f84f57f9
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}