mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
crypto: crypto4xx - remove bad list_del
commit a728a196d2 upstream.
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: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
68bf812b35
commit
af4b765a78
@@ -1034,12 +1034,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;
|
||||
|
||||
Reference in New Issue
Block a user