aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
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 /drivers/media
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 'drivers/media')
-rw-r--r--drivers/media/platform/soc_camera/soc_camera.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
index 2e47b5127d4b..2dd0e5272941 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -1459,7 +1459,7 @@ static int soc_camera_async_complete(struct v4l2_async_notifier *notifier)
1459} 1459}
1460 1460
1461static int scan_async_group(struct soc_camera_host *ici, 1461static int scan_async_group(struct soc_camera_host *ici,
1462 struct v4l2_async_subdev **asd, int size) 1462 struct v4l2_async_subdev **asd, unsigned int size)
1463{ 1463{
1464 struct soc_camera_async_subdev *sasd; 1464 struct soc_camera_async_subdev *sasd;
1465 struct soc_camera_async_client *sasc; 1465 struct soc_camera_async_client *sasc;