video: tegra: host: Clear new args before filling it
Terje Bergstrom [Wed, 25 Dec 2013 09:45:16 +0000 (11:45 +0200)]
Before copying old submit args to new struct, clear the area for new
struct. This prevents leaving garbage in fields that are not
explicitly filled.

Change-Id: I405bc8385a90bceb152a9fa7d339e07acb897315
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/349593

drivers/video/tegra/host/bus_client.c

index 5e8b3ff..de37686 100644 (file)
@@ -1035,6 +1035,7 @@ static long nvhost_channelctl(struct file *filp,
                struct nvhost32_submit_args *args32 = (void *)buf;
                struct nvhost_submit_args args;
 
+               memset(&args, 0, sizeof(args));
                args.submit_version = args32->submit_version;
                args.num_syncpt_incrs = args32->num_syncpt_incrs;
                args.num_cmdbufs = args32->num_cmdbufs;