V4L/DVB (7086): driver: tcm825x - fix logical typo error
authorCyrill Gorcunov <gorcunov@gmail.com>
Sat, 26 Jan 2008 10:38:01 +0000 (07:38 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 18 Feb 2008 14:14:57 +0000 (11:14 -0300)
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>
CC: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/tcm825x.c

index 41cd6a0b0485a29c44f3821d7bcc41338f6a1d89..fb895f6684a3cf31851323afa4ef5db03e84c762 100644 (file)
@@ -851,7 +851,7 @@ static int tcm825x_probe(struct i2c_client *client)
        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;