]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
drm: don't double-free on driver load error
authorIlia Mirkin <imirkin@alum.mit.edu>
Thu, 5 Dec 2013 14:42:49 +0000 (09:42 -0500)
committerDave Airlie <airlied@redhat.com>
Fri, 13 Dec 2013 03:03:50 +0000 (13:03 +1000)
commit0f58411d4fd704d8958879fb08751eae3573271b
treefb5459f2bfd56398029c0184b17a68f8e309035c
parent0ca9fff744c8ae22401d1ef10a378588afd55abc
drm: don't double-free on driver load error

All instances of drm_dev_register are followed by drm_dev_free on
failure. Don't free dev->control/render/primary on failure, as they will
be freed by drm_dev_free since commit 8f6599da8e (drm: delay minor
destruction to drm_dev_free()). Instead unplug them.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reported-and-tested-by: Bruno Prémont <bonbons@linux-vserver.org>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_stub.c