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>
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;