]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Staging: rtl8723bs/os_dep: Remove typecast in kfree
authorMeghana Madhyastha <meghana.madhyastha@gmail.com>
Sat, 16 Sep 2017 08:12:16 +0000 (13:42 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Sep 2017 10:00:07 +0000 (12:00 +0200)
Remove typecast of pointer in kfree((u8 *)pdvobj) as
it is not needed.

Found using the following Coccinelle semantic patch:
@@
identifier x;
type t;
@@

-kfree((t *)x)
+kfree(x)

Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/os_dep/os_intfs.c

index f509713c9e683cd1f4459c91e6cfc0e4104bc165..51df42de9167c921b25f2eed2d89ab1de8155984 100644 (file)
@@ -719,7 +719,7 @@ void devobj_deinit(struct dvobj_priv *pdvobj)
        mutex_destroy(&pdvobj->setch_mutex);
        mutex_destroy(&pdvobj->setbw_mutex);
 
-       kfree((u8 *)pdvobj);
+       kfree(pdvobj);
 }
 
 u8 rtw_reset_drv_sw(struct adapter *padapter)