diff options
author | Jon Hunter <jon-hunter@ti.com> | 2013-04-01 15:33:50 -0400 |
---|---|---|
committer | Jon Hunter <jon-hunter@ti.com> | 2013-04-01 15:33:50 -0400 |
commit | dca3a783400a18e2bf4503b1d4a85c4d0ca1a7e4 (patch) | |
tree | a3689b801070c1360b120b7280c6adc4de5f692a /crypto/algapi.c | |
parent | 71856843fb1d8ee455a4c1a60696c74afa4809e5 (diff) | |
parent | 31d9adca82ce65e5c99d045b5fd917c702b6fce3 (diff) |
Merge commit '31d9adca82ce65e5c99d045b5fd917c702b6fce3' into tmp
Conflicts:
arch/arm/plat-omap/dmtimer.c
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); | |||
447 | void crypto_unregister_template(struct crypto_template *tmpl) | 447 | void crypto_unregister_template(struct crypto_template *tmpl) |
448 | { | 448 | { |
449 | struct crypto_instance *inst; | 449 | struct crypto_instance *inst; |
450 | struct hlist_node *p, *n; | 450 | struct hlist_node *n; |
451 | struct hlist_head *list; | 451 | struct hlist_head *list; |
452 | LIST_HEAD(users); | 452 | LIST_HEAD(users); |
453 | 453 | ||
@@ -457,7 +457,7 @@ void crypto_unregister_template(struct crypto_template *tmpl) | |||
457 | list_del_init(&tmpl->list); | 457 | list_del_init(&tmpl->list); |
458 | 458 | ||
459 | list = &tmpl->instances; | 459 | list = &tmpl->instances; |
460 | hlist_for_each_entry(inst, p, list, list) { | 460 | hlist_for_each_entry(inst, list, list) { |
461 | int err = crypto_remove_alg(&inst->alg, &users); | 461 | int err = crypto_remove_alg(&inst->alg, &users); |
462 | BUG_ON(err); | 462 | BUG_ON(err); |
463 | } | 463 | } |
@@ -466,7 +466,7 @@ void crypto_unregister_template(struct crypto_template *tmpl) | |||
466 | 466 | ||
467 | up_write(&crypto_alg_sem); | 467 | up_write(&crypto_alg_sem); |
468 | 468 | ||
469 | hlist_for_each_entry_safe(inst, p, n, list, list) { | 469 | hlist_for_each_entry_safe(inst, n, list, list) { |
470 | BUG_ON(atomic_read(&inst->alg.cra_refcnt) != 1); | 470 | BUG_ON(atomic_read(&inst->alg.cra_refcnt) != 1); |
471 | tmpl->free(inst); | 471 | tmpl->free(inst); |
472 | } | 472 | } |
@@ -749,12 +749,10 @@ struct crypto_alg *crypto_attr_alg2(struct rtattr *rta, | |||
749 | u32 type, u32 mask) | 749 | u32 type, u32 mask) |
750 | { | 750 | { |
751 | const char *name; | 751 | const char *name; |
752 | int err; | ||
753 | 752 | ||
754 | name = crypto_attr_alg_name(rta); | 753 | name = crypto_attr_alg_name(rta); |
755 | err = PTR_ERR(name); | ||
756 | if (IS_ERR(name)) | 754 | if (IS_ERR(name)) |
757 | return ERR_PTR(err); | 755 | return ERR_CAST(name); |
758 | 756 | ||
759 | return crypto_find_alg(name, frontend, type, mask); | 757 | return crypto_find_alg(name, frontend, type, mask); |
760 | } | 758 | } |