public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] driver: tcm825x - fix logical typo error
@ 2008-01-25 20:27 Cyrill Gorcunov
  2008-01-25 21:05 ` Guennadi Liakhovetski
  0 siblings, 1 reply; 2+ messages in thread
From: Cyrill Gorcunov @ 2008-01-25 20:27 UTC (permalink / raw)
  To: LKML; +Cc: Andrew Morton

This patch does fix potential NULL pointer dereference
due to logical typo error.

The issue is pointed out by
Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---

Index: linux-2.6.git/drivers/media/video/tcm825x.c
===================================================================
--- linux-2.6.git.orig/drivers/media/video/tcm825x.c	2008-01-23 19:01:47.000000000 +0300
+++ linux-2.6.git/drivers/media/video/tcm825x.c	2008-01-25 23:13:15.000000000 +0300
@@ -851,7 +851,7 @@ static int tcm825x_probe(struct i2c_clie
 	sensor->platform_data = client->dev.platform_data;
 
 	if (sensor->platform_data == NULL
-	    && !sensor->platform_data->is_okay())
+	    || !sensor->platform_data->is_okay())
 		return -ENODEV;
 
 	sensor->v4l2_int_device = &tcm825x_int_device;

-- 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] driver: tcm825x - fix logical typo error
  2008-01-25 20:27 [PATCH] driver: tcm825x - fix logical typo error Cyrill Gorcunov
@ 2008-01-25 21:05 ` Guennadi Liakhovetski
  0 siblings, 0 replies; 2+ messages in thread
From: Guennadi Liakhovetski @ 2008-01-25 21:05 UTC (permalink / raw)
  To: Cyrill Gorcunov; +Cc: LKML, Andrew Morton

On Fri, 25 Jan 2008, Cyrill Gorcunov wrote:

> This patch does fix potential NULL pointer dereference
> due to logical typo error.
> 
> The issue is pointed out by
> Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
> ---
> 
> Index: linux-2.6.git/drivers/media/video/tcm825x.c
> ===================================================================
> --- linux-2.6.git.orig/drivers/media/video/tcm825x.c	2008-01-23 19:01:47.000000000 +0300
> +++ linux-2.6.git/drivers/media/video/tcm825x.c	2008-01-25 23:13:15.000000000 +0300
> @@ -851,7 +851,7 @@ static int tcm825x_probe(struct i2c_clie
>  	sensor->platform_data = client->dev.platform_data;
>  
>  	if (sensor->platform_data == NULL
> -	    && !sensor->platform_data->is_okay())
> +	    || !sensor->platform_data->is_okay())
>  		return -ENODEV;
>  
>  	sensor->v4l2_int_device = &tcm825x_int_device;

Now that it missed 2.6.24, you probably want to send it to -stable too. 
Even though the patch is trivial, it might be a good idea to cc: v4l2 
maintainer and / or driver author.

Thanks
Guennadi
---
Guennadi Liakhovetski

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-25 21:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-25 20:27 [PATCH] driver: tcm825x - fix logical typo error Cyrill Gorcunov
2008-01-25 21:05 ` Guennadi Liakhovetski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox