From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Date: Mon, 13 May 2013 04:57:37 +0000 (-0300)
Subject: [media] vpif_capture: fix error return code in vpif_probe()
X-Git-Tag: firefly_0821_release~176^2~3573^2~1891
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4fa94e224b84be7b2522a0f5ce5b64124f146fac;p=firefly-linux-kernel-4.4.55.git

[media] vpif_capture: fix error return code in vpif_probe()

Fix to return -ENODEV in the subdevice register error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---

diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
index a1b42b037678..caaf4fedadec 100644
--- a/drivers/media/platform/davinci/vpif_capture.c
+++ b/drivers/media/platform/davinci/vpif_capture.c
@@ -2159,6 +2159,7 @@ static __init int vpif_probe(struct platform_device *pdev)
 
 		if (!vpif_obj.sd[i]) {
 			vpif_err("Error registering v4l2 subdevice\n");
+			err = -ENODEV;
 			goto probe_subdev_out;
 		}
 		v4l2_info(&vpif_obj.v4l2_dev, "registered sub device %s\n",