diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-09-03 15:50:39 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-09-03 17:59:27 -0300 |
commit | d8e8b40c067c3242b32ebe835f6bc6247fd67454 (patch) | |
tree | 7a298b2986f83eeb7f3fd21abe2a6e1de4206464 /drivers/media/platform | |
parent | a04557a20be0ff3733eca454abdd1bd4c5ebc3f2 (diff) | |
download | op-kernel-dev-d8e8b40c067c3242b32ebe835f6bc6247fd67454.zip op-kernel-dev-d8e8b40c067c3242b32ebe835f6bc6247fd67454.tar.gz |
[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: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/s5p-tv/hdmi_drv.c | 2 | ||||
-rw-r--r-- | drivers/media/platform/s5p-tv/sdo_drv.c | 2 | ||||
-rw-r--r-- | drivers/media/platform/s5p-tv/sii9234_drv.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/platform/s5p-tv/hdmi_drv.c b/drivers/media/platform/s5p-tv/hdmi_drv.c index 754740f..37c8bd6 100644 --- a/drivers/media/platform/s5p-tv/hdmi_drv.c +++ b/drivers/media/platform/s5p-tv/hdmi_drv.c @@ -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, diff --git a/drivers/media/platform/s5p-tv/sdo_drv.c b/drivers/media/platform/s5p-tv/sdo_drv.c index 5a7c379..72cf892 100644 --- a/drivers/media/platform/s5p-tv/sdo_drv.c +++ b/drivers/media/platform/s5p-tv/sdo_drv.c @@ -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) diff --git a/drivers/media/platform/s5p-tv/sii9234_drv.c b/drivers/media/platform/s5p-tv/sii9234_drv.c index 3dd762e..db8c17b 100644 --- a/drivers/media/platform/s5p-tv/sii9234_drv.c +++ b/drivers/media/platform/s5p-tv/sii9234_drv.c @@ -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) |