[PATCH 1/2] staging: csr: remove casting of return value from kmalloc
Marcos Souza
marcos.souza.org at gmail.com
Tue Sep 4 19:30:53 UTC 2012
2012/9/4 Devendra Naga <devendra.aaru at gmail.com>:
> as per Documentation/CodingStyle, casting of void pointer to
> any other pointer is not needed
>
> Signed-off-by: Devendra Naga <devendra.aaru at gmail.com>
> ---
> drivers/staging/csr/sme_sys.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/csr/sme_sys.c b/drivers/staging/csr/sme_sys.c
> index 7ff3f43..b9b51c6 100644
> --- a/drivers/staging/csr/sme_sys.c
> +++ b/drivers/staging/csr/sme_sys.c
> @@ -2123,7 +2123,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));
> --
> 1.7.9.5
>
Acked-by: Marcos Paulo de Souza <marcos.souza.org at gmail.com>
--
Att,
Marcos Paulo de Souza
Acadêmico de Ciencia da Computação - FURB - SC
"Uma vida sem desafios é uma vida sem razão"
"A life without challenges, is a non reason life"
More information about the devel
mailing list