staging: rtl8723bs: hal: sdio_ops: fix Comparison to NULL
authorHariprasad Kelam <hariprasad.kelam@gmail.com>
Tue, 11 Jun 2019 18:21:42 +0000 (23:51 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Jun 2019 09:50:08 +0000 (11:50 +0200)
this patch fixes below warning reported by checkpatch

CHECK: Comparison to NULL could be written "c2h_evt"

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/sdio_ops.c

index ac79de8..baeffbb 100644 (file)
@@ -1058,7 +1058,7 @@ void sd_int_dpc(struct adapter *adapter)
 
                DBG_8192C("%s: C2H Command\n", __func__);
                c2h_evt = rtw_zmalloc(16);
-               if (c2h_evt != NULL) {
+               if (c2h_evt) {
                        if (rtw_hal_c2h_evt_read(adapter, (u8 *)c2h_evt) == _SUCCESS) {
                                if (c2h_id_filter_ccx_8723b((u8 *)c2h_evt)) {
                                        /* Handle CCX report here */