summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_drm.c
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2014-02-12 14:00:59 +0900
committerBen Skeggs <bskeggs@redhat.com>2014-03-26 13:59:32 +1000
commitb6c4285afa66f2f258a237771fd90905a194957d (patch)
tree73d59a5ca30c76ce4e47c24bace5f3256f3a3f3e /drivers/gpu/drm/nouveau/nouveau_drm.c
parentef98c1f7b37116ae45d892a23f46cffdda31773c (diff)
downloadlinux-b6c4285afa66f2f258a237771fd90905a194957d.tar.gz
linux-b6c4285afa66f2f258a237771fd90905a194957d.tar.xz
drm/nouveau: handle -EACCES runtime PM return code
pm_runtime_get*() may return -EACCES to indicate a device does not have runtime PM enabled. This is currently the case with platform devices on Nouveau, and is not an error in that context. Handle this case without failure. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drm.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 89c484d8ac26..a9f4a8b6e95c 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -679,7 +679,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)
/* need to bring up power immediately if opening device */
ret = pm_runtime_get_sync(dev->dev);
- if (ret < 0)
+ if (ret < 0 && ret != -EACCES)
return ret;
get_task_comm(tmpname, current);
@@ -762,7 +762,7 @@ long nouveau_drm_ioctl(struct file *filp,
dev = file_priv->minor->dev;
ret = pm_runtime_get_sync(dev->dev);
- if (ret < 0)
+ if (ret < 0 && ret != -EACCES)
return ret;
ret = drm_ioctl(filp, cmd, arg);