staging: davinci_vpfe: fix error check
Subsystems (2)
PATCH 1/1 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.
--- drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c +1 -1
@@ -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 ; }
Signature · 1 line
1.8.3.1
Quoted 6 lines · Levente Kurusa
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 <[email protected]>Signed-off-by Levente Kurusa <[email protected]>
Quoted 19 lines
drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c +1
-1@@ -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 ; }Signature · 1 line
1.8.3.1
Hi Prabhakar,
(Removing Greg, Mauro and the [email protected] list to avoid spamming them)
Quoted 9 lines · On Saturday 15 February 2014 09:16:19 Josh Triplett wrote:
Quoted 6 lines · Levente Kurusa
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 <[email protected]>Signed-off-by Levente Kurusa <[email protected]>Reviewed-by Josh Triplett <[email protected]>
Could you please handle this patch ?
Quoted 18 lines
Quoted 18 lines
drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.cindex 2d36b60..b2daf5e 100644drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c +1
-1@@ -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 ;}
Signature · 3 lines
Regards, Laurent Pinchart