crypto: chcr - Fixes Unchecked dereference inside function
Fixes 324429d741
, Unchecked dereference inside function.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jitendra Lulla <JLULLA@chelsio.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
358961d1cd
commit
18f0aa06a3
|
@ -439,8 +439,9 @@ write_sg_to_skb(struct sk_buff *skb, unsigned int *frags,
|
|||
skb->len += count;
|
||||
skb->data_len += count;
|
||||
skb->truesize += count;
|
||||
|
||||
while (count > 0) {
|
||||
if (sg && (!(sg->length)))
|
||||
if (!sg || (!(sg->length)))
|
||||
break;
|
||||
spage = sg_page(sg);
|
||||
get_page(spage);
|
||||
|
|
Loading…
Reference in New Issue