]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
[media] s5p-tv: Simplify the return logic
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 3 Sep 2014 18:50:39 +0000 (15:50 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 3 Sep 2014 20:59:27 +0000 (17:59 -0300)
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>
drivers/media/platform/s5p-tv/hdmi_drv.c
drivers/media/platform/s5p-tv/sdo_drv.c
drivers/media/platform/s5p-tv/sii9234_drv.c

index 754740f4b671db0a0749d3b21ee7afdf5c1fc8b1..37c8bd694c5f250c0e7d64f8a601cb14d5c93bcd 100644 (file)
@@ -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,
index 5a7c3796f22e349de4edf608bd5eb8ffee62d0dd..72cf892dd0089af58d9d2eac6bf533b881b1d6bd 100644 (file)
@@ -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)
index 3dd762e5b67e8e53ff05d2fd57351c71e9471797..db8c17bb4aaaf357b6aa1c613e5aee570b953d5d 100644 (file)
@@ -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)