From: Mariusz Kozlowski Signed-off-by: Mariusz Kozlowski Cc: Edward Shishkin Cc: "Vladimir V. Saveliev" Signed-off-by: Andrew Morton --- fs/reiser4/plugin/file/cryptcompress.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff -puN fs/reiser4/plugin/file/cryptcompress.h~reiser4-kmalloc-memset-conversion-to-kzalloc fs/reiser4/plugin/file/cryptcompress.h --- a/fs/reiser4/plugin/file/cryptcompress.h~reiser4-kmalloc-memset-conversion-to-kzalloc +++ a/fs/reiser4/plugin/file/cryptcompress.h @@ -98,10 +98,9 @@ static inline int alloc_ts(struct tfm_st assert("edward-931", stm); assert("edward-932", *stm == NULL); - *stm = kmalloc(sizeof **stm, reiser4_ctx_gfp_mask_get()); - if (*stm == NULL) + *stm = kzalloc(sizeof(**stm), reiser4_ctx_gfp_mask_get()); + if (!*stm) return -ENOMEM; - memset(*stm, 0, sizeof **stm); return 0; } _