lkml.org 
[lkml]   [2014]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: davinci_vpfe: fix error check
On Sat, Feb 15, 2014 at 11:17:11AM +0100, Levente Kurusa wrote:
> 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>

> drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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;
> }
> --
> 1.8.3.1
>


\
 
 \ /
  Last update: 2014-02-15 19:01    [W:0.033 / U:6.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site