]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
drm/sysfs: Do not drop device reference twice
authorThierry Reding <thierry.reding@gmail.com>
Wed, 30 Oct 2013 10:59:05 +0000 (11:59 +0100)
committerDave Airlie <airlied@redhat.com>
Wed, 30 Oct 2013 20:33:49 +0000 (06:33 +1000)
commit9d6104e0174b130ed864571b31811c3fd09fd611
tree00ac8c1893076529a62f90cf2a236ef338d16fd3
parentbe51e4a78155ff6c5d9299bf726e86b554e21117
drm/sysfs: Do not drop device reference twice

device_unregister() already drops its reference to the struct device, so
explicitly calling put_device() before device_unregister() can cause the
device to have been freed before it can be unregistered.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Tested-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_sysfs.c