mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
drm: Avoid use-before-null-test on dev in drm_cleanup().
Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
This commit is contained in:
parent
f1acec9338
commit
f51c5b6e62
1 changed files with 1 additions and 3 deletions
|
@ -294,8 +294,6 @@ EXPORT_SYMBOL(drm_init);
|
|||
*/
|
||||
static void drm_cleanup(struct drm_device * dev)
|
||||
{
|
||||
struct drm_driver *driver = dev->driver;
|
||||
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (!dev) {
|
||||
|
@ -330,7 +328,7 @@ static void drm_cleanup(struct drm_device * dev)
|
|||
if (drm_core_check_feature(dev, DRIVER_MODESET))
|
||||
drm_put_minor(&dev->control);
|
||||
|
||||
if (driver->driver_features & DRIVER_GEM)
|
||||
if (dev->driver->driver_features & DRIVER_GEM)
|
||||
drm_gem_destroy(dev);
|
||||
|
||||
drm_put_minor(&dev->primary);
|
||||
|
|
Loading…
Reference in a new issue