summaryrefslogtreecommitdiff
path: root/drivers/staging/media
diff options
context:
space:
mode:
authorLevente Kurusa <levex@linux.com>2014-02-15 10:17:11 (GMT)
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-02-28 16:36:28 (GMT)
commit57802c52610b534fbec7537da4f7d5554964cb60 (patch)
tree6d4598af13794459f7894c67d96fbfde73996f9a /drivers/staging/media
parent6e9179e2af61f93e6416c3dd11aca46dcd5a68e8 (diff)
downloadlinux-57802c52610b534fbec7537da4f7d5554964cb60.tar.xz
[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: David Binderman <dcb314@hotmail.com> Signed-off-by: Levente Kurusa <levex@linux.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r--drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
index 2d36b60..b2daf5e 100644
--- a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
+++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
@@ -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;
}