projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8d3de8
)
crypto: inside-secure - remove null check before kfree
author
Himanshu Jha
<
[email protected]
>
Sat, 26 Aug 2017 21:15:30 +0000
(
02:45
+0530)
committer
Herbert Xu
<
[email protected]
>
Fri, 22 Sep 2017 09:43:25 +0000
(17:43 +0800)
Kfree on NULL pointer is a no-op and therefore checking is redundant.
Signed-off-by: Himanshu Jha <
[email protected]
>
Signed-off-by: Herbert Xu <
[email protected]
>
drivers/crypto/inside-secure/safexcel_hash.c
patch
|
blob
|
history
diff --git
a/drivers/crypto/inside-secure/safexcel_hash.c
b/drivers/crypto/inside-secure/safexcel_hash.c
index 3980f946874fa08b64288b5d8b04bcac9134a0ad..74feb622710147baf79d49c25a119be7e640ac7a 100644
(file)
--- a/
drivers/crypto/inside-secure/safexcel_hash.c
+++ b/
drivers/crypto/inside-secure/safexcel_hash.c
@@
-308,10
+308,8
@@
unmap_cache:
ctx->base.cache_sz = 0;
}
free_cache:
- if (ctx->base.cache) {
- kfree(ctx->base.cache);
- ctx->base.cache = NULL;
- }
+ kfree(ctx->base.cache);
+ ctx->base.cache = NULL;
unlock:
spin_unlock_bh(&priv->ring[ring].egress_lock);