From: Wei Yongjun yongjun_...@trendmicro.com.cn
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_...@trendmicro.com.cn
---
drivers/media/platform/blackfin/bfin_capture.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/platform/blackfin/bfin_capture.c
b/drivers/media/platform/blackfin/bfin_capture.c
index 0e55b08..2d1e032 100644
--- a/drivers/media/platform/blackfin/bfin_capture.c
+++ b/drivers/media/platform/blackfin/bfin_capture.c
@@ -1070,6 +1070,7 @@ static int bcap_probe(struct platform_device *pdev)
if (!config-num_inputs) {
v4l2_err(bcap_dev-v4l2_dev,
Unable to work without input\n);
+ ret = -EINVAL;
goto err_unreg_vdev;
}
@@ -1079,6 +1080,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;
}
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html