diff mbox

crypto: sha1-mb - Remove pointless cast

Message ID 1429783930-7318-1-git-send-email-firogm@gmail.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show

Commit Message

Firo Yang April 23, 2015, 10:12 a.m. UTC
Since kzalloc() returns a void pointer, we don't need to cast the
return value in arch/x86/crypto/sha-mb/sha1_mb.c::sha1_mb_mod_init().

Signed-off-by: Firo Yang <firogm@gmail.com>
---
 arch/x86/crypto/sha-mb/sha1_mb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Herbert Xu April 26, 2015, 6:50 a.m. UTC | #1
On Thu, Apr 23, 2015 at 06:12:10PM +0800, Firo Yang wrote:
> Since kzalloc() returns a void pointer, we don't need to cast the
> return value in arch/x86/crypto/sha-mb/sha1_mb.c::sha1_mb_mod_init().
> 
> Signed-off-by: Firo Yang <firogm@gmail.com>

Applied.
diff mbox

Patch

diff --git a/arch/x86/crypto/sha-mb/sha1_mb.c b/arch/x86/crypto/sha-mb/sha1_mb.c
index e510b1c..0cb5149 100644
--- a/arch/x86/crypto/sha-mb/sha1_mb.c
+++ b/arch/x86/crypto/sha-mb/sha1_mb.c
@@ -885,7 +885,8 @@  static int __init sha1_mb_mod_init(void)
 		INIT_DELAYED_WORK(&cpu_state->flush, mcryptd_flusher);
 		cpu_state->cpu = cpu;
 		cpu_state->alg_state = &sha1_mb_alg_state;
-		cpu_state->mgr = (struct sha1_ctx_mgr *) kzalloc(sizeof(struct sha1_ctx_mgr), GFP_KERNEL);
+		cpu_state->mgr = kzalloc(sizeof(struct sha1_ctx_mgr),
+					GFP_KERNEL);
 		if (!cpu_state->mgr)
 			goto err2;
 		sha1_ctx_mgr_init(cpu_state->mgr);