提交 18f0aa06 编写于 作者: H Harsh Jain 提交者: Herbert Xu

crypto: chcr - Fixes Unchecked dereference inside function

Fixes 324429d7, Unchecked dereference inside function.
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJitendra Lulla <JLULLA@chelsio.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 358961d1
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册