diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2013-03-18 10:57:32 +0100 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2013-03-18 10:57:57 +0100 |
| commit | aa1262b3876ec5249ff464618a7dcd46b3ca54e2 (patch) | |
| tree | b150bb2c83c073e1f0e298ba7899148f7d991ef7 /crypto/algapi.c | |
| parent | 806b2139db236e0cbd0b5833ab0ce139f0196bcd (diff) | |
| parent | 6dbe51c251a327e012439c4772097a13df43c5b8 (diff) | |
Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply patch to the newly
added ITG-3200 driver.
Diffstat (limited to 'crypto/algapi.c')
| -rw-r--r-- | crypto/algapi.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index c3b9bfeeb7ff..6149a6e09643 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c @@ -447,7 +447,7 @@ EXPORT_SYMBOL_GPL(crypto_register_template); void crypto_unregister_template(struct crypto_template *tmpl) { struct crypto_instance *inst; - struct hlist_node *p, *n; + struct hlist_node *n; struct hlist_head *list; LIST_HEAD(users); @@ -457,7 +457,7 @@ void crypto_unregister_template(struct crypto_template *tmpl) list_del_init(&tmpl->list); list = &tmpl->instances; - hlist_for_each_entry(inst, p, list, list) { + hlist_for_each_entry(inst, list, list) { int err = crypto_remove_alg(&inst->alg, &users); BUG_ON(err); } @@ -466,7 +466,7 @@ void crypto_unregister_template(struct crypto_template *tmpl) up_write(&crypto_alg_sem); - hlist_for_each_entry_safe(inst, p, n, list, list) { + hlist_for_each_entry_safe(inst, n, list, list) { BUG_ON(atomic_read(&inst->alg.cra_refcnt) != 1); tmpl->free(inst); } @@ -749,12 +749,10 @@ struct crypto_alg *crypto_attr_alg2(struct rtattr *rta, u32 type, u32 mask) { const char *name; - int err; name = crypto_attr_alg_name(rta); - err = PTR_ERR(name); if (IS_ERR(name)) - return ERR_PTR(err); + return ERR_CAST(name); return crypto_find_alg(name, frontend, type, mask); } |
