media: rcar-vin: fix wrong return value in rvin_set_channel_routing()
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Fri, 14 Dec 2018 06:18:21 +0000 (04:18 -0200)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 21 Jan 2019 17:41:57 +0000 (15:41 -0200)
If the operation in rvin_set_channel_routing() is successful the 'ret'
variable contains the runtime PM use count for the VIN master device.
The intention is not to return the use count to the caller but to return
0 on success else none zero.

Fix this by always returning 0 if the operation is successful.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/rcar-vin/rcar-dma.c

index 9232331..beb9248 100644 (file)
@@ -1341,5 +1341,5 @@ int rvin_set_channel_routing(struct rvin_dev *vin, u8 chsel)
 
        pm_runtime_put(vin->dev);
 
-       return ret;
+       return 0;
 }