فهرست منبع

[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>
Levente Kurusa 11 سال پیش
والد
کامیت
57802c5261
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c

+ 1 - 1
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);
 	ipipe_mode = get_ipipe_mode(ipipe);
-	if (ipipe < 0) {
+	if (ipipe_mode < 0) {
 		pr_err("Failed to get ipipe mode");
 		pr_err("Failed to get ipipe mode");
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}