diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2020-10-16 05:11:25 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-10-16 20:11:20 +0200 |
commit | 6ed9b92e290b530197c2dda2271f5312abc475e6 (patch) | |
tree | 32e14e0d8fc71b03a567c34c2249bb2380dfeb49 | |
parent | lib/idr.c: document that ida_simple_{get,remove}() are deprecated (diff) | |
download | linux-6ed9b92e290b530197c2dda2271f5312abc475e6.tar.xz linux-6ed9b92e290b530197c2dda2271f5312abc475e6.zip |
lib/scatterlist.c: avoid a double memset
'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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Link: https://lkml.kernel.org/r/20200920071544.368841-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | lib/scatterlist.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |