[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1452191248-15847-7-git-send-email-javier@osg.samsung.com>
Date: Thu, 7 Jan 2016 15:27:20 -0300
From: Javier Martinez Canillas <javier@....samsung.com>
To: linux-kernel@...r.kernel.org
Cc: Javier Martinez Canillas <javier@....samsung.com>,
Mauro Carvalho Chehab <mchehab@....samsung.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
"Prabhakar\"" <prabhakar.csengg@...il.com>,
Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>,
Guennadi Liakhovetski <g.liakhovetski@....de>,
Hans Verkuil <hans.verkuil@...co.com>,
linux-media@...r.kernel.org
Subject: [PATCH 6/8] [media] tvp7002: Check v4l2_of_parse_endpoint() return value
The v4l2_of_parse_endpoint() function can fail so check the return value.
Signed-off-by: Javier Martinez Canillas <javier@....samsung.com>
---
drivers/media/i2c/tvp7002.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c
index 83c79fa5f61d..4aac303da5d4 100644
--- a/drivers/media/i2c/tvp7002.c
+++ b/drivers/media/i2c/tvp7002.c
@@ -905,11 +905,13 @@ tvp7002_get_pdata(struct i2c_client *client)
if (!endpoint)
return NULL;
+ if (v4l2_of_parse_endpoint(endpoint, &bus_cfg))
+ goto done;
+
pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL);
if (!pdata)
goto done;
- v4l2_of_parse_endpoint(endpoint, &bus_cfg);
flags = bus_cfg.bus.parallel.flags;
if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
--
2.4.3
Powered by blists - more mailing lists