Merge tag 'amd-drm-next-5.9-2020-07-01' of git://people.freedesktop.org/~agd5f/linux...
[platform/kernel/linux-starfive.git] / drivers / gpu / drm / radeon / radeon_kms.c
index c5d1dc9..99ee60f 100644 (file)
@@ -638,8 +638,10 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
        file_priv->driver_priv = NULL;
 
        r = pm_runtime_get_sync(dev->dev);
-       if (r < 0)
+       if (r < 0) {
+               pm_runtime_put_autosuspend(dev->dev);
                return r;
+       }
 
        /* new gpu have virtual address space support */
        if (rdev->family >= CHIP_CAYMAN) {