From: David Herrmann Date: Tue, 26 Nov 2013 11:50:50 +0000 (+0100) Subject: drm/sysfs: fix OOM verification X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a1f84f57f9f7a5060f17482fc26b39174ecb7a28;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git drm/sysfs: fix OOM verification Copy/Paste typo.. we need to test for ->kdev instead of ->dev. Reported-by: Juha Leppänen Signed-off-by: David Herrmann Signed-off-by: Dave Airlie --- 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; }