提交 a3483353 编写于 作者: D David Herrmann 提交者: Dave Airlie

drm: check for !kdev in drm_unplug_minor()

We moved minor deallocation to drm_dev_free() in:
  commit 8f6599da
  Author: David Herrmann <dh.herrmann@gmail.com>
  Date:   Sun Oct 20 18:55:45 2013 +0200

      drm: delay minor destruction to drm_dev_free()

However, this causes a call to drm_unplug_minor(), which should just do
nothing as drm_dev_unregister() already called this.

But a separate patch caused kdev lifetime changes:
  commit 5bdebb18
  Author: Dave Airlie <airlied@redhat.com>
  Date:   Fri Oct 11 14:07:25 2013 +1000

      drm/sysfs: sort out minor and connector device object lifetimes.

Thus making our dev_is_registered() call useles (and even segfault if it
is NULL). Replace it with a simple !kdev test and we're fine.
Reported-by: NHuax Lu <huax.lu@intel.com>
Reported-by: NDaniel Vetter <daniel@ffwll.ch>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71208Tested-by: Nlu hua <huax.lu@intel.com>
Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
Signed-off-by: NDave Airlie <airlied@gmail.com>
上级 0846c728
......@@ -338,7 +338,7 @@ static int drm_get_minor(struct drm_device *dev, struct drm_minor **minor,
*/
static void drm_unplug_minor(struct drm_minor *minor)
{
if (!minor || !device_is_registered(minor->kdev))
if (!minor || !minor->kdev)
return;
#if defined(CONFIG_DEBUG_FS)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册