diff options
author | Kangjie Lu <[email protected]> | 2019-03-24 18:16:02 -0500 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-04-01 10:45:59 -0700 |
commit | 3c77ff8f8bae4d328de662b26921bc4da1d293f1 (patch) | |
tree | c0dace31e0698ce917b89408e07130e8d72ece53 | |
parent | f8b347064b89aaac2c82bbf77de60deaaf87b116 (diff) |
drm/v3d: fix a missing check of pm_runtime_get_sync
pm_runtime_get_sync could fail and thus deserves a check.
The patch adds such a check and return its error code upstream
if it indeed failed.
Signed-off-by: Kangjie Lu <[email protected]>
Signed-off-by: Eric Anholt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Mukesh Ojha <[email protected]>
-rw-r--r-- | drivers/gpu/drm/v3d/v3d_drv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c index d600628bb5c1..a06b05f714a5 100644 --- a/drivers/gpu/drm/v3d/v3d_drv.c +++ b/drivers/gpu/drm/v3d/v3d_drv.c @@ -102,6 +102,8 @@ static int v3d_get_param_ioctl(struct drm_device *dev, void *data, return -EINVAL; ret = pm_runtime_get_sync(v3d->dev); + if (ret < 0) + return ret; if (args->param >= DRM_V3D_PARAM_V3D_CORE0_IDENT0 && args->param <= DRM_V3D_PARAM_V3D_CORE0_IDENT2) { args->value = V3D_CORE_READ(0, offset); |