mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
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
1 changed files with 2 additions and 1 deletions
|
|
@ -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 a new issue