staging: rtl8723bs: Remove unneeded cast
authorChristopher Diaz Riveros <chrisadr@gentoo.org>
Tue, 20 Feb 2018 16:33:54 +0000 (11:33 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Feb 2018 13:59:05 +0000 (14:59 +0100)
Fix Coccinelle alert:

drivers/staging//rtl8723bs/os_dep/sdio_intf.c:340:13-27: WARNING: casting value returned by memory allocation function to (struct adapter *) is useless.

This issue was detected by using the Coccinelle software.

Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/os_dep/sdio_intf.c

index 9433248..99c407b 100644 (file)
@@ -337,7 +337,7 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct
        struct adapter *padapter = NULL;
        PSDIO_DATA psdio = &dvobj->intf_data;
 
-       padapter = (struct adapter *)vzalloc(sizeof(*padapter));
+       padapter = vzalloc(sizeof(*padapter));
        if (padapter == NULL) {
                goto exit;
        }