aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2013-06-24 04:19:19 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-28 13:57:18 -0400
commitf687f3263e99e34289e076352fad23974ee072ab (patch)
treeea1d391a59d1ce8a5e2f431ad2422745b65cf3d1 /include
parentfe05e141a4d70d9417fd628133ecb32851f2e136 (diff)
[media] V4L2: soc-camera: fix uninitialised use compiler warning
In scan_async_group() if the size parameter is negative, the sasd pointer will be used uninitialised: drivers/media/platform/soc_camera/soc_camera.c: In function "soc_camera_host_register": drivers/media/platform/soc_camera/soc_camera.c:1514:55: warning: "sasd" may be used uninitialized in this function [-Wmaybe-uninitialized] sasd->asd.match.i2c.adapter_id, sasd->asd.match.i2c.address); ^ drivers/media/platform/soc_camera/soc_camera.c:1464:34: note: "sasd" was declared here struct soc_camera_async_subdev *sasd; Fix this by making "size" and the array, from which it is assigned unsigned. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/media/sh_mobile_ceu.h2
-rw-r--r--include/media/soc_camera.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/media/sh_mobile_ceu.h b/include/media/sh_mobile_ceu.h
index 8937241e5f37..7f57056c22ba 100644
--- a/include/media/sh_mobile_ceu.h
+++ b/include/media/sh_mobile_ceu.h
@@ -23,7 +23,7 @@ struct sh_mobile_ceu_info {
23 int max_height; 23 int max_height;
24 struct sh_mobile_ceu_companion *csi2; 24 struct sh_mobile_ceu_companion *csi2;
25 struct v4l2_async_subdev **asd; /* Flat array, arranged in groups */ 25 struct v4l2_async_subdev **asd; /* Flat array, arranged in groups */
26 int *asd_sizes; /* 0-terminated array pf asd group sizes */ 26 unsigned int *asd_sizes; /* 0-terminated array pf asd group sizes */
27}; 27};
28 28
29#endif /* __ASM_SH_MOBILE_CEU_H__ */ 29#endif /* __ASM_SH_MOBILE_CEU_H__ */
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h
index 906ed98c6e95..34d2414f2b8c 100644
--- a/include/media/soc_camera.h
+++ b/include/media/soc_camera.h
@@ -87,7 +87,7 @@ struct soc_camera_host {
87 const char *drv_name; 87 const char *drv_name;
88 struct soc_camera_host_ops *ops; 88 struct soc_camera_host_ops *ops;
89 struct v4l2_async_subdev **asd; /* Flat array, arranged in groups */ 89 struct v4l2_async_subdev **asd; /* Flat array, arranged in groups */
90 int *asd_sizes; /* 0-terminated array of asd group sizes */ 90 unsigned int *asd_sizes; /* 0-terminated array of asd group sizes */
91}; 91};
92 92
93struct soc_camera_host_ops { 93struct soc_camera_host_ops {