diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2024-03-09 11:24:27 +0300 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2024-03-09 23:33:22 +0300 |
commit | c8d25d696f526a42ad8cf615dc1131c0b00c662e (patch) | |
tree | 0a108134d179c4d804d0bcff9069844ddda12591 /fs/pstore | |
parent | 98bc7e26e14fbb26a6abf97603d59532475e97f8 (diff) | |
download | linux-c8d25d696f526a42ad8cf615dc1131c0b00c662e.tar.xz |
pstore/zone: Don't clear memory twice
There is no need to call memset(..., 0, ...) on memory allocated by
kcalloc(). It is already zeroed.
Remove the redundant call.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/fa2597400051c18c6ca11187b0e4b906729991b2.1709972649.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'fs/pstore')
-rw-r--r-- | fs/pstore/zone.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/pstore/zone.c b/fs/pstore/zone.c index abca117725c8..694db616663f 100644 --- a/fs/pstore/zone.c +++ b/fs/pstore/zone.c @@ -1217,7 +1217,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); |