Commit eddb2aca authored by Christian Lamparter's avatar Christian Lamparter Committed by Kleber Sacilotto de Souza

crypto: crypto4xx - remove bad list_del

BugLink: https://bugs.launchpad.net/bugs/1790884

commit a728a196 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: default avatarChristian Lamparter <chunkeey@googlemail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarAmit Pundir <amit.pundir@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 1a15c2ed
...@@ -1029,13 +1029,11 @@ int crypto4xx_register_alg(struct crypto4xx_device *sec_dev, ...@@ -1029,13 +1029,11 @@ int crypto4xx_register_alg(struct crypto4xx_device *sec_dev,
break; break;
} }
if (rc) { if (rc)
list_del(&alg->entry);
kfree(alg); kfree(alg);
} else { else
list_add_tail(&alg->entry, &sec_dev->alg_list); list_add_tail(&alg->entry, &sec_dev->alg_list);
} }
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment