Skip to content

Commit

Permalink
crypto: scatterwalk - Remove unnecessary BUG in scatterwalk_start
Browse files Browse the repository at this point in the history
Nothing bad will happen even if sg->length is zero, so there is
no point in keeping this BUG_ON in scatterwalk_start.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Herbert Xu committed Jul 18, 2016
1 parent 28cf86f commit 2ee732d
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions crypto/scatterwalk.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ static inline void memcpy_dir(void *buf, void *sgdata, size_t nbytes, int out)
void scatterwalk_start(struct scatter_walk *walk, struct scatterlist *sg)
{
walk->sg = sg;

BUG_ON(!sg->length);

walk->offset = sg->offset;
}
EXPORT_SYMBOL_GPL(scatterwalk_start);
Expand Down

0 comments on commit 2ee732d

Please sign in to comment.