summaryrefslogtreecommitdiff
path: root/drivers/media/platform/blackfin
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-05-13 04:52:16 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-05-27 08:51:43 -0300
commitd9fdbeff26b87e68d0e7f0d506e3cfc0f2a28d56 (patch)
tree66cd706f8cea0a47d384f13b94a0c4f9bd36ff64 /drivers/media/platform/blackfin
parent6ec735df78c63c3623c76e75a975390f60ae0640 (diff)
[media] blackfin: fix error return code in bcap_probe()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/blackfin')
-rw-r--r--drivers/media/platform/blackfin/bfin_capture.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/platform/blackfin/bfin_capture.c b/drivers/media/platform/blackfin/bfin_capture.c
index 03530bc6bdd1..ca8d56aecfb0 100644
--- a/drivers/media/platform/blackfin/bfin_capture.c
+++ b/drivers/media/platform/blackfin/bfin_capture.c
@@ -974,7 +974,7 @@ static int bcap_probe(struct platform_device *pdev)
int ret;
config = pdev->dev.platform_data;
- if (!config) {
+ if (!config || !config->num_inputs) {
v4l2_err(pdev->dev.driver, "Unable to get board config\n");
return -ENODEV;
}
@@ -1081,11 +1081,6 @@ static int bcap_probe(struct platform_device *pdev)
NULL);
if (bcap_dev->sd) {
int i;
- if (!config->num_inputs) {
- v4l2_err(&bcap_dev->v4l2_dev,
- "Unable to work without input\n");
- goto err_unreg_vdev;
- }
/* update tvnorms from the sub devices */
for (i = 0; i < config->num_inputs; i++)
@@ -1093,6 +1088,7 @@ static int bcap_probe(struct platform_device *pdev)
} else {
v4l2_err(&bcap_dev->v4l2_dev,
"Unable to register sub device\n");
+ ret = -ENODEV;
goto err_unreg_vdev;
}