summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/mt9v032.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2015-07-28 10:33:55 +0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-08-11 15:27:18 +0200
commit8e8a6b23f115906678252190c8fcf4168cc60fd5 (patch)
treead77356a25f06d12c77c91c9dc913fb2a57c9c65 /drivers/media/i2c/mt9v032.c
parent[media] v4l2: move tracepoint generation into separate file (diff)
downloadlinux-8e8a6b23f115906678252190c8fcf4168cc60fd5.tar.xz
linux-8e8a6b23f115906678252190c8fcf4168cc60fd5.zip
[media] mt9v032: fix uninitialized variable warning
drivers/media/i2c/mt9v032.c: In function ‘mt9v032_probe’: CC [M] drivers/media/i2c/s5k4ecgx.o drivers/media/i2c/mt9v032.c:996:20: warning: ‘pdata’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (pdata && pdata->link_freqs) { ^ It can indeed be uninitialized in one corner case. Initialize to NULL. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c/mt9v032.c')
-rw-r--r--drivers/media/i2c/mt9v032.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/mt9v032.c b/drivers/media/i2c/mt9v032.c
index 977f4006edbd..a68ce94ee097 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;