Staging rtl8172: Remove unnecessary typecast
authorVatika Harlalka <vatikaharlalka@gmail.com>
Mon, 9 Mar 2015 08:54:42 +0000 (14:24 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Mar 2015 12:37:22 +0000 (13:37 +0100)
Using addressof and then casting to the original type is unneeded.
So these casts can be removed.
Issue detected via Coccinelle script.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/hal_init.c

index 324da34383eaac6a6a5b38a7d83206d9556559a8..0a1c6313e78156b708e570591fca431b0981f33e 100644 (file)
@@ -92,7 +92,7 @@ static u32 rtl871x_open_fw(struct _adapter *padapter, const u8 **ppmappedfw)
 
 static void fill_fwpriv(struct _adapter *padapter, struct fw_priv *pfwpriv)
 {
-       struct dvobj_priv *pdvobj = (struct dvobj_priv *)&padapter->dvobjpriv;
+       struct dvobj_priv *pdvobj = &padapter->dvobjpriv;
        struct registry_priv *pregpriv = &padapter->registrypriv;
 
        memset(pfwpriv, 0, sizeof(struct fw_priv));