projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Blackfin arch: fix bug can not wakeup from sleep via push buttons
[powerpc.git]
/
crypto
/
hmac.c
diff --git
a/crypto/hmac.c
b/crypto/hmac.c
index
44187c5
..
8802fb6
100644
(file)
--- a/
crypto/hmac.c
+++ b/
crypto/hmac.c
@@
-197,13
+197,18
@@
static void hmac_free(struct crypto_instance *inst)
kfree(inst);
}
kfree(inst);
}
-static struct crypto_instance *hmac_alloc(
void *param, unsigned int len
)
+static struct crypto_instance *hmac_alloc(
struct rtattr **tb
)
{
struct crypto_instance *inst;
struct crypto_alg *alg;
{
struct crypto_instance *inst;
struct crypto_alg *alg;
+ int err;
+
+ err = crypto_check_attr_type(tb, CRYPTO_ALG_TYPE_HASH);
+ if (err)
+ return ERR_PTR(err);
- alg = crypto_get_attr_alg(
param, len
, CRYPTO_ALG_TYPE_HASH,
- CRYPTO_ALG_TYPE_HASH_MASK
| CRYPTO_ALG_ASYNC
);
+ alg = crypto_get_attr_alg(
tb
, CRYPTO_ALG_TYPE_HASH,
+ CRYPTO_ALG_TYPE_HASH_MASK);
if (IS_ERR(alg))
return ERR_PTR(PTR_ERR(alg));
if (IS_ERR(alg))
return ERR_PTR(PTR_ERR(alg));