Commit d8e8b40c authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] s5p-tv: Simplify the return logic

Make sure pm_runtime_* calls does not use unnecessary
IS_ERR_VALUE().

Reported by scripts/coccinelle/api/pm_runtime.cocci script.
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent a04557a2
......@@ -615,7 +615,7 @@ static int hdmi_s_power(struct v4l2_subdev *sd, int on)
else
ret = pm_runtime_put_sync(hdev->dev);
/* only values < 0 indicate errors */
return IS_ERR_VALUE(ret) ? ret : 0;
return ret < 0 ? ret : 0;
}
static int hdmi_s_dv_timings(struct v4l2_subdev *sd,
......
......@@ -190,7 +190,7 @@ static int sdo_s_power(struct v4l2_subdev *sd, int on)
ret = pm_runtime_put_sync(dev);
/* only values < 0 indicate errors */
return IS_ERR_VALUE(ret) ? ret : 0;
return ret < 0 ? ret : 0;
}
static int sdo_streamon(struct sdo_device *sdev)
......
......@@ -289,7 +289,7 @@ static int sii9234_s_power(struct v4l2_subdev *sd, int on)
else
ret = pm_runtime_put(&ctx->client->dev);
/* only values < 0 indicate errors */
return IS_ERR_VALUE(ret) ? ret : 0;
return ret < 0 ? ret : 0;
}
static int sii9234_s_stream(struct v4l2_subdev *sd, int enable)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment