[PATCH 4.19.y-cip 07/40] media: rcar-vin: fix wrong return value in rvin_set_channel_routing()

Lad Prabhakar

From: Niklas Söderlund <niklas.soderlund+renesas@...>

commit 8d19d5d03b4d09177b0ae87f964eb751e6f51b7b upstream.

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@...>
Reviewed-by: Laurent Pinchart <laurent.pinchart@...>
Signed-off-by: Hans Verkuil <hverkuil-cisco@...>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@...>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...>
drivers/media/platform/rcar-vin/rcar-dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c b/drivers/media/platform/rcar-vin/rcar-dma.c
index 70a8cc433a03..e51620c6cc40 100644
--- a/drivers/media/platform/rcar-vin/rcar-dma.c
+++ b/drivers/media/platform/rcar-vin/rcar-dma.c
@@ -1343,5 +1343,5 @@ int rvin_set_channel_routing(struct rvin_dev *vin, u8 chsel)


- return ret;
+ return 0;

Join cip-dev@lists.cip-project.org to automatically receive all group messages.