Messages in this thread Patch in this message | | | From | Christophe JAILLET <> | Subject | [PATCH] lib/scatterlist: Avoid a double memset | Date | Sun, 20 Sep 2020 09:15:44 +0200 |
| |
'sgl' is zeroed a few lines below in 'sg_init_table()'. There is no need to clear it twice.
Remove the redundant initialization.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> --- lib/scatterlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/scatterlist.c b/lib/scatterlist.c index 5d63a8857f36..d94628fa3349 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c @@ -504,7 +504,7 @@ struct scatterlist *sgl_alloc_order(unsigned long long length, nalloc++; } sgl = kmalloc_array(nalloc, sizeof(struct scatterlist), - (gfp & ~GFP_DMA) | __GFP_ZERO); + gfp & ~GFP_DMA); if (!sgl) return NULL; -- 2.25.1
| |