From: Levente Kurusa Date: Sat, 15 Feb 2014 10:17:11 +0000 (-0300) Subject: [media] staging: davinci_vpfe: fix error check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=57802c52610b534fbec7537da4f7d5554964cb60;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 Signed-off-by: Levente Kurusa Reviewed-by: Josh Triplett Signed-off-by: Lad, Prabhakar Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c index 2d36b60bdbf1..b2daf5e63f88 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; }