]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
tegra-nor: Coverity fixes
authorPavitrakumar <pavitrak@nvidia.com>
Tue, 7 Jul 2015 13:54:12 +0000 (19:24 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Tue, 22 Sep 2015 11:51:06 +0000 (04:51 -0700)
Coverity fixes
memsetting 'nor_cs_info' to avoid uninitialzied usage of
the fields in code.

Coverity ID 18089

Bug 200083369

Change-Id: I08f1b308feb08a8953a51ec868fb493c00f29790
Signed-off-by: Pavitrakumar <pavitrak@nvidia.com>
Reviewed-on: http://git-master/r/767141
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
drivers/mtd/maps/tegra_nor_gmi.c

index 84713051ed00cd672de26f1354d6c8f8efa5cae6..2e7c2487c4b88dd98ca868bc96d4a58649192b2a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014, NVIDIA Corporation.  All rights reserved.
+ * Copyright (C) 2014-2015, NVIDIA Corporation.  All rights reserved.
  *
  * Author:
  * Bharath H S <bhs@nvidia.com>
@@ -774,6 +774,7 @@ static struct tegra_nor_platform_data *tegra_nor_parse_dt(
        enum of_gpio_flags gpio_flags;
        u64 phy_addr;
 
+       memset(nor_cs_info, 0, sizeof(nor_cs_info));
        pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
        if (!pdata) {
                dev_err(&pdev->dev, "Memory alloc for pdata failed");