]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: rt18188eu: Remove useless cast on NULL
authorTapasweni Pathak <tapaswenipathak@gmail.com>
Thu, 30 Oct 2014 12:55:00 +0000 (18:25 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Oct 2014 20:09:15 +0000 (13:09 -0700)
Cast on NULL to a pointer type is not required. This
patch removes NULL casted to some pointer type.

The sematic patch used is:
@r@
type T;
@@
- (T *)NULL
+ NULL

Build tested it.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c

index 8bb490820557fafd63b5746bd892cc91cef203c6..a00ebcddc8818ffb6e351e133b9b2463cc0262a4 100644 (file)
@@ -945,7 +945,7 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame
        }
 
        pstat = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
-       if (pstat == (struct sta_info *)NULL) {
+       if (pstat == NULL) {
                status = _RSON_CLS2_;
                goto asoc_class2_error;
        }