[PATCH 03/11] mtd: cfi-flash: statically initialize instead of memset

Sascha Hauer s.hauer at pengutronix.de
Mon Jun 22 01:40:58 PDT 2015


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/mtd/nor/cfi_flash.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mtd/nor/cfi_flash.c b/drivers/mtd/nor/cfi_flash.c
index 01d23d5..caa93b6 100644
--- a/drivers/mtd/nor/cfi_flash.c
+++ b/drivers/mtd/nor/cfi_flash.c
@@ -295,11 +295,9 @@ static ulong flash_get_size (struct flash_info *info)
 	int erase_region_size;
 	int erase_region_count;
 	int cur_offset = 0;
-	struct cfi_qry qry;
+	struct cfi_qry qry = {};
 	unsigned long base = (unsigned long)info->base;
 
-	memset(&qry, 0, sizeof(qry));
-
 	info->ext_addr = 0;
 	info->cfi_version = 0;
 #ifdef CFG_FLASH_PROTECTION
-- 
2.1.4




More information about the barebox mailing list