projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8b3470
)
drm/v3d: fix a missing check of pm_runtime_get_sync
author
Kangjie Lu
<kjlu@umn.edu>
Sun, 24 Mar 2019 23:16:02 +0000
(18:16 -0500)
committer
Eric Anholt
<eric@anholt.net>
Mon, 1 Apr 2019 17:45:59 +0000
(10:45 -0700)
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 <kjlu@umn.edu>
Signed-off-by: Eric Anholt <eric@anholt.net>
Link:
https://patchwork.freedesktop.org/patch/msgid/20190324231602.2436-1-kjlu@umn.edu
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
drivers/gpu/drm/v3d/v3d_drv.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/v3d/v3d_drv.c
b/drivers/gpu/drm/v3d/v3d_drv.c
index d600628bb5c1facfb762d48edc5ec9ca4e44329d..a06b05f714a5e605caf2075c5a538415048776ef 100644
(file)
--- 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);