drm/atomic-helper: drm_atomic_helper_shutdown(NULL) should be a noop
[linux-2.6-microblaze.git] / drivers / gpu / drm / drm_atomic_helper.c
index 292e38e..71d3993 100644 (file)
@@ -3339,6 +3339,9 @@ void drm_atomic_helper_shutdown(struct drm_device *dev)
        struct drm_modeset_acquire_ctx ctx;
        int ret;
 
+       if (dev == NULL)
+               return;
+
        DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
 
        ret = drm_atomic_helper_disable_all(dev, &ctx);