drm: Prevent NULL deref in drm_name_info()
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 20 Jun 2016 18:53:33 +0000 (19:53 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 20 Jun 2016 19:20:16 +0000 (21:20 +0200)
commite4245ea898797f606cf2260c9c1970414b96af78
tree8b3538d0384afab78c6799f497f304f6bf07d7fb
parentc001da4f7c025a612a594b0ac421bce11fb5bc8b
drm: Prevent NULL deref in drm_name_info()

If a driver does not have a parent, or never sets the unique name for
itself, then we may proceed to chase a NULL dereference through
debugfs/.../name.

Testcase: igt/vgem_basic/debugfs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1466448813-23340-1-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/drm_info.c