From: Vandana BN Date: Mon, 29 Apr 2019 16:00:45 +0000 (+0530) Subject: staging: rtl8723bs: Fix checkpatch.pl warnings X-Git-Tag: v5.2-rc1~153^2~21 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=601d6f0360986560cdf5779ddab36cd4d9e7062b;p=users%2Fjedix%2Flinux-maple.git staging: rtl8723bs: Fix checkpatch.pl warnings This patch resolves coding style brace warning and constant on right warning. WARNING: Comparisons should place the constant on the right side of the test WARNING: braces {} are not necessary for single statement blocks CHECK: Comparison to NULL could be written "!pbuf" Signed-off-by: Vandana BN ------ v2- Edited commit message and subject v3- Edited commit message v4- changed NULL check to use !pbuf ------ Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723bs/core/rtw_debug.c b/drivers/staging/rtl8723bs/core/rtw_debug.c index 0de1e12a676e..9f8446ccf771 100644 --- a/drivers/staging/rtl8723bs/core/rtw_debug.c +++ b/drivers/staging/rtl8723bs/core/rtw_debug.c @@ -1425,9 +1425,8 @@ int proc_get_btcoex_info(struct seq_file *m, void *v) padapter = (struct adapter *)rtw_netdev_priv(dev); pbuf = rtw_zmalloc(bufsize); - if (NULL == pbuf) { + if (!pbuf) return -ENOMEM; - } rtw_btcoex_DisplayBtCoexInfo(padapter, pbuf, bufsize);