gpu: v3d: fix a missing check of pm_runtime_get_sync
Subsystems (3)
PATCH 1/1 gpu: 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.
--- drivers/gpu/drm/v3d/v3d_drv.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/v3d/v3d_drv.c +2 -0
@@ -101,6 +101,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);
Signature · 1 line
2.17.1
Quoted 6 lines · Kangjie Lu
pm_runtime_get_synccould 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]>
Thanks.
Mukesh
Quoted 9 lines
--- drivers/gpu/drm/v3d/v3d_drv.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/v3d/v3d_drv.c +0
-0
drivers/gpu/drm/v3d/v3d_drv.c static int v3d_get_param_ioctl(struct drm_device *dev, void *data, · line 108
Quoted 8 lines
drivers/gpu/drm/v3d/v3d_drv.c +2
-0@@ -101,6 +101,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);
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · Kangjie Lu
pm_runtime_get_synccould 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]>
-Mukesh
Quoted 17 lines
--- drivers/gpu/drm/v3d/v3d_drv.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/v3d/v3d_drv.c +2
-0@@ -101,6 +101,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);
Quoted 4 lines · Kangjie Lu
pm_runtime_get_synccould fail and thus deserves a check.The patch adds such a check and return its error code upstream if it indeed failed.
Applied the review and merged to drm-misc-next. Thanks!