<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<div class="moz-cite-prefix">On 3/25/2019 4:46 AM, Kangjie Lu wrote:<br>
</div>
<blockquote type="cite"
cite="mid:20190324231602.2436-1-kjlu@umn.edu">
<pre class="moz-quote-pre" wrap="">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 <a class="moz-txt-link-rfc2396E" href="mailto:kjlu@umn.edu"><kjlu@umn.edu></a></pre>
</blockquote>
<p><br>
</p>
<p>
Reviewed-by: Mukesh Ojha <<a href="mailto:mojha@codeaurora.org"
title="mojha@codeaurora.org" class="mailto">mojha@codeaurora.org</a>>
</p>
<p>
Thanks.<br>
Mukesh
</p>
<blockquote type="cite"
cite="mid:20190324231602.2436-1-kjlu@umn.edu">
<pre class="moz-quote-pre" wrap="">
---
drivers/gpu/drm/v3d/v3d_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c
index f0afcec72c34..99daad11fac2 100644
--- a/drivers/gpu/drm/v3d/v3d_drv.c
+++ b/drivers/gpu/drm/v3d/v3d_drv.c
@@ -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);
</pre>
</blockquote>
</body>
</html>