If "x" is compared to NULL, use "!x" instead of it, so as to follow the kernel coding style.
Signed-off-by: Shreeya Patel <shreeya.patel23...@gmail.com> --- drivers/staging/rtl8723bs/hal/sdio_ops.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c index 67c4cca..d6a4572 100644 --- a/drivers/staging/rtl8723bs/hal/sdio_ops.c +++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c @@ -215,7 +215,7 @@ static u32 sdio_read32(struct intf_hdl *pintfhdl, u32 addr) u8 *ptmpbuf; ptmpbuf = rtw_malloc(8); - if (NULL == ptmpbuf) { + if (!ptmpbuf) { DBG_8192C(KERN_ERR "%s: Allocate memory FAIL!(size =8) addr = 0x%x\n", __func__, addr); return SDIO_ERR_VAL32; } @@ -264,7 +264,7 @@ static s32 sdio_readN(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pbuf) ftaddr &= ~(u16)0x3; n = cnt + shift; ptmpbuf = rtw_malloc(n); - if (NULL == ptmpbuf) + if (!ptmpbuf) return -1; err = sd_read(pintfhdl, ftaddr, n, ptmpbuf); @@ -367,7 +367,7 @@ static s32 sdio_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pbuf) ftaddr &= ~(u16)0x3; n = cnt + shift; ptmpbuf = rtw_malloc(n); - if (NULL == ptmpbuf) + if (!ptmpbuf) return -1; err = sd_read(pintfhdl, ftaddr, 4, ptmpbuf); if (err) { @@ -457,7 +457,7 @@ static u32 sdio_read_port( #ifdef SDIO_DYNAMIC_ALLOC_MEM oldmem = mem; mem = rtw_malloc(cnt); - if (mem == NULL) { + if (!mem) { DBG_8192C(KERN_WARNING "%s: allocate memory %d bytes fail!\n", __func__, cnt); mem = oldmem; oldmem = NULL; @@ -745,7 +745,7 @@ static s32 ReadInterrupt8723BSdio(struct adapter *padapter, u32 *phisr) u8 val8, hisr_len; - if (phisr == NULL) + if (!phisr) return false; himr = GET_HAL_DATA(padapter)->sdio_himr; @@ -969,13 +969,13 @@ static struct recv_buf *sd_recv_rxfifo(struct adapter *padapter, u32 size) /* 3 1. alloc recvbuf */ precvpriv = &padapter->recvpriv; precvbuf = rtw_dequeue_recvbuf(&precvpriv->free_recv_buf_queue); - if (precvbuf == NULL) { + if (!precvbuf) { DBG_871X_LEVEL(_drv_err_, "%s: alloc recvbuf FAIL!\n", __func__); return NULL; } /* 3 2. alloc skb */ - if (precvbuf->pskb == NULL) { + if (!precvbuf->pskb) { SIZE_PTR tmpaddr = 0; SIZE_PTR alignment = 0; @@ -989,7 +989,7 @@ static struct recv_buf *sd_recv_rxfifo(struct adapter *padapter, u32 size) skb_reserve(precvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment)); } - if (precvbuf->pskb == NULL) { + if (!precvbuf->pskb) { DBG_871X("%s: alloc_skb fail! read =%d\n", __func__, readsize); return NULL; } @@ -1247,7 +1247,7 @@ u8 RecvOnePkt(struct adapter *padapter, u32 size) DBG_871X("+%s: size: %d+\n", __func__, size); - if (padapter == NULL) { + if (!padapter) { DBG_871X(KERN_ERR "%s: padapter is NULL!\n", __func__); return false; } -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html