提交 a728a196 编写于 作者: C Christian Lamparter 提交者: Herbert Xu

crypto: crypto4xx - remove bad list_del

alg entries are only added to the list, after the registration
was successful. If the registration failed, it was never added
to the list in the first place.
Signed-off-by: NChristian Lamparter <chunkeey@googlemail.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 f1f2237f
......@@ -1033,12 +1033,10 @@ int crypto4xx_register_alg(struct crypto4xx_device *sec_dev,
break;
}
if (rc) {
list_del(&alg->entry);
if (rc)
kfree(alg);
} else {
else
list_add_tail(&alg->entry, &sec_dev->alg_list);
}
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册