Commit 57802c52 authored by Levente Kurusa's avatar Levente Kurusa Committed by Mauro Carvalho Chehab

[media] staging: davinci_vpfe: fix error check

The check would check the pointer, which is never less than 0.
According to the error message, the correct check would be
to check the return value of ipipe_mode. Check that instead.
Reported-by: default avatarDavid Binderman <dcb314@hotmail.com>
Signed-off-by: default avatarLevente Kurusa <levex@linux.com>
Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
Signed-off-by: default avatarLad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 6e9179e2
......@@ -267,7 +267,7 @@ int config_ipipe_hw(struct vpfe_ipipe_device *ipipe)
}
ipipe_mode = get_ipipe_mode(ipipe);
if (ipipe < 0) {
if (ipipe_mode < 0) {
pr_err("Failed to get ipipe mode");
return -EINVAL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment