summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-11-22 23:52:17 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-11-25 12:57:07 +0300
commitd3d83ee20afda16ad0133ba00f63c11a8d842a35 (patch)
treee815ded9f05664f4c540965e0fafa6ecb8cf8bc3 /drivers/media
parent399426cadf5b0539a5b2a4d805257ce8acc6aba2 (diff)
downloadlinux-d3d83ee20afda16ad0133ba00f63c11a8d842a35.tar.xz
[media] DaVinci-VPFE-Capture: fix error handling
A recent cleanup had the right idea to remove the initialization of the error variable, but missed the actual benefit of that, which is that we get warnings if there is a bug in it. Now we get a warning about a bug that was introduced by this cleanup: drivers/media/platform/davinci/vpfe_capture.c: In function 'vpfe_probe': drivers/media/platform/davinci/vpfe_capture.c:1992:9: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] This adds the missing initialization that the warning is about, and another one that was preexisting and that we did not get a warning for. That second bug has existed since the driver was first added. Fixes: efb74461f5a6 ("[media] DaVinci-VPFE-Capture: Delete an unnecessary variable initialisation in vpfe_probe()") Fixes: 7da8a6cb3e5b ("V4L/DVB (12248): v4l: vpfe capture bridge driver for DM355 and DM6446") [mchehab@s-opensource.com: fix a merge conflict] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/davinci/vpfe_capture.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c
index bc2c62b95493..ee1cd79739c8 100644
--- a/drivers/media/platform/davinci/vpfe_capture.c
+++ b/drivers/media/platform/davinci/vpfe_capture.c
@@ -1966,6 +1966,7 @@ static int vpfe_probe(struct platform_device *pdev)
v4l2_info(&vpfe_dev->v4l2_dev,
"v4l2 sub device %s register fails\n",
sdinfo->name);
+ ret = -ENXIO;
goto probe_sd_out;
}
}