[PATCH] drm/sysfs: Do not drop device reference twice

2013-10-30 Thread Thierry Reding
On Wed, Oct 30, 2013 at 02:05:02PM -0200, Paulo Zanoni wrote: > 2013/10/30 Thierry Reding : > > 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

[PATCH] drm/sysfs: Do not drop device reference twice

2013-10-30 Thread Paulo Zanoni
2013/10/30 Thierry Reding : > 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 I started investigating

[PATCH] drm/sysfs: Do not drop device reference twice

2013-10-30 Thread Thierry Reding
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 --- drivers/gpu/drm/drm_sysfs.c | 2 -- 1 file changed, 2

[PATCH] drm/sysfs: Do not drop device reference twice

2013-10-30 Thread Ben Widawsky
On Wed, Oct 30, 2013 at 11:59:05AM +0100, Thierry Reding wrote: > 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: