Skip to contentSkip to conversation

pstore: zone: remove unnecessary memset

PATCH New Wan Jiabing 1 participant 1 message Mar 18, 2022 Pstore filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pstore: zone: remove unnecessary memset

zones is allocated by kcalloc(). The memory is set to zero. It is unnecessary to call memset again.

---
 fs/pstore/zone.c | 1 -
 1 file changed, 1 deletion(-)
fs/pstore/zone.c +0 -1
index 7c8f8feac6c3..27ee216345a5 100644
@@ -1215,7 +1215,6 @@ static struct pstore_zone **psz_init_zones(enum pstore_type_id type,
 		pr_err("allocate for zones %s failed\n", name);
 		return ERR_PTR(-ENOMEM);
 	}
-	memset(zones, 0, c * sizeof(*zones));
 
 	for (i = 0; i < c; i++) {
 		zone = psz_init_zone(type, off, record_size);
Signature · 1 line
2.35.1