public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [media] mt9v032: Add missing initialization of pdata in mt9v032_get_pdata()
@ 2015-06-29 12:23 Geert Uytterhoeven
  2015-06-30  9:05 ` Laurent Pinchart
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2015-06-29 12:23 UTC (permalink / raw)
  To: Laurent Pinchart, Mauro Carvalho Chehab
  Cc: linux-media, linux-kernel, Geert Uytterhoeven

drivers/media/i2c/mt9v032.c: In function ‘mt9v032_get_pdata’:
drivers/media/i2c/mt9v032.c:885: warning: ‘pdata’ may be used uninitialized in this function

If parsing the endpoint node properties fails, mt9v032_get_pdata() will
return an uninitialized pointer value.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/media/i2c/mt9v032.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/mt9v032.c b/drivers/media/i2c/mt9v032.c
index 977f4006edbd496d..a68ce94ee097604a 100644
--- a/drivers/media/i2c/mt9v032.c
+++ b/drivers/media/i2c/mt9v032.c
@@ -882,7 +882,7 @@ static const struct regmap_config mt9v032_regmap_config = {
 static struct mt9v032_platform_data *
 mt9v032_get_pdata(struct i2c_client *client)
 {
-	struct mt9v032_platform_data *pdata;
+	struct mt9v032_platform_data *pdata = NULL;
 	struct v4l2_of_endpoint endpoint;
 	struct device_node *np;
 	struct property *prop;
-- 
1.9.1


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

end of thread, other threads:[~2015-06-30  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-29 12:23 [PATCH] [media] mt9v032: Add missing initialization of pdata in mt9v032_get_pdata() Geert Uytterhoeven
2015-06-30  9:05 ` Laurent Pinchart

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