[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>
This commit is contained in:
parent
6ec735df78
commit
d9fdbeff26
@ -974,7 +974,7 @@ static int bcap_probe(struct platform_device *pdev)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
config = pdev->dev.platform_data;
|
config = pdev->dev.platform_data;
|
||||||
if (!config) {
|
if (!config || !config->num_inputs) {
|
||||||
v4l2_err(pdev->dev.driver, "Unable to get board config\n");
|
v4l2_err(pdev->dev.driver, "Unable to get board config\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
@ -1081,11 +1081,6 @@ static int bcap_probe(struct platform_device *pdev)
|
|||||||
NULL);
|
NULL);
|
||||||
if (bcap_dev->sd) {
|
if (bcap_dev->sd) {
|
||||||
int i;
|
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 */
|
/* update tvnorms from the sub devices */
|
||||||
for (i = 0; i < config->num_inputs; i++)
|
for (i = 0; i < config->num_inputs; i++)
|
||||||
@ -1093,6 +1088,7 @@ static int bcap_probe(struct platform_device *pdev)
|
|||||||
} else {
|
} else {
|
||||||
v4l2_err(&bcap_dev->v4l2_dev,
|
v4l2_err(&bcap_dev->v4l2_dev,
|
||||||
"Unable to register sub device\n");
|
"Unable to register sub device\n");
|
||||||
|
ret = -ENODEV;
|
||||||
goto err_unreg_vdev;
|
goto err_unreg_vdev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user