[PATCH] media: imx-media-internal-sd: Use memset to clear pdevinfo struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When building with W=1 the following warning shows up:

drivers/staging/media/imx/imx-media-internal-sd.c:274:49: warning: Using plain integer as NULL pointer

Fix this problem by using memset() to clear the pdevinfo structure.

Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxx>
---
 drivers/staging/media/imx/imx-media-internal-sd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/imx/imx-media-internal-sd.c b/drivers/staging/media/imx/imx-media-internal-sd.c
index 70833fe503b5..377c20863b76 100644
--- a/drivers/staging/media/imx/imx-media-internal-sd.c
+++ b/drivers/staging/media/imx/imx-media-internal-sd.c
@@ -271,7 +271,7 @@ static int add_internal_subdev(struct imx_media_dev *imxmd,
 			       int ipu_id)
 {
 	struct imx_media_internal_sd_platformdata pdata;
-	struct platform_device_info pdevinfo = {0};
+	struct platform_device_info pdevinfo;
 	struct platform_device *pdev;
 
 	pdata.grp_id = isd->id->grp_id;
@@ -283,6 +283,7 @@ static int add_internal_subdev(struct imx_media_dev *imxmd,
 	imx_media_grp_id_to_sd_name(pdata.sd_name, sizeof(pdata.sd_name),
 				    pdata.grp_id, ipu_id);
 
+	memset(&pdevinfo, 0, sizeof(pdevinfo));
 	pdevinfo.name = isd->id->name;
 	pdevinfo.id = ipu_id * num_isd + isd->id->index;
 	pdevinfo.parent = imxmd->md.dev;
-- 
2.14.1




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux