From: Devendra Naga Date: Tue, 4 Sep 2012 19:26:43 +0000 (+0530) Subject: staging: csr: remove casting of return value from kmalloc X-Git-Tag: firefly_0821_release~3680^2~1977^2~709 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6f6ed3db33720276068d70c17ce305e4132a123f;p=firefly-linux-kernel-4.4.55.git staging: csr: remove casting of return value from kmalloc as per Documentation/CodingStyle, casting of void pointer to any other pointer is not needed Signed-off-by: Devendra Naga Acked-by: Marcos Paulo de Souza Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/csr/sme_sys.c b/drivers/staging/csr/sme_sys.c index 4330f2a3029f..240344c6be45 100644 --- a/drivers/staging/csr/sme_sys.c +++ b/drivers/staging/csr/sme_sys.c @@ -2121,7 +2121,7 @@ static int peer_add_new_record(unifi_priv_t *priv,CsrWifiRouterCtrlPeerAddReq *r /* Allocate for the new station record , to avoid race condition would happen between ADD_PEER & * DEL_PEER the allocation made atomic memory rather than kernel memory */ - newRecord = (CsrWifiRouterCtrlStaInfo_t *) kmalloc(sizeof(CsrWifiRouterCtrlStaInfo_t), GFP_ATOMIC); + newRecord = kmalloc(sizeof(CsrWifiRouterCtrlStaInfo_t), GFP_ATOMIC); if (!newRecord) { unifi_error(priv, "failed to allocate the %d bytes of mem for station record\n", sizeof(CsrWifiRouterCtrlStaInfo_t));