Skip to content

Commit

Permalink
drm/sysfs: fix OOM verification
Browse files Browse the repository at this point in the history
Copy/Paste typo.. we need to test for ->kdev instead of ->dev.

Reported-by: Juha Leppänen <[email protected]>
Signed-off-by: David Herrmann <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
  • Loading branch information
David Herrmann authored and airlied committed Nov 28, 2013
1 parent 8ae516a commit a1f84f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/drm_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a1f84f5

Please sign in to comment.