diff options
Diffstat (limited to 'crypto/scatterwalk.c')
-rw-r--r-- | crypto/scatterwalk.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c index 297e19d13c4e..9aeeb52004a5 100644 --- a/crypto/scatterwalk.c +++ b/crypto/scatterwalk.c | |||
@@ -105,6 +105,9 @@ void scatterwalk_map_and_copy(void *buf, struct scatterlist *sg, | |||
105 | struct scatter_walk walk; | 105 | struct scatter_walk walk; |
106 | unsigned int offset = 0; | 106 | unsigned int offset = 0; |
107 | 107 | ||
108 | if (!nbytes) | ||
109 | return; | ||
110 | |||
108 | for (;;) { | 111 | for (;;) { |
109 | scatterwalk_start(&walk, sg); | 112 | scatterwalk_start(&walk, sg); |
110 | 113 | ||