lkml.org 
[lkml]   [2008]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] driver: tcm825x - fix logical typo error
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;
--



\
 
 \ /
  Last update: 2008-01-25 21:29    [W:0.155 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site