From 766ea098f6ecd63675f1626277600cfda2c071fe Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Mon, 18 Mar 2019 09:48:17 -0700 Subject: [PATCH] qcacmn: os_if: Replace explicit comparison to NULL Per the Linux Kernel coding style, as enforced by the kernel checkpatch script, pointers should not be explicitly compared to NULL. Therefore within os_if replace any such comparisons with logical operations performed on the pointer itself. Change-Id: I1cf6f897d1d2722d112dd3f802d789652373eaed CRs-Fixed: 2418254 --- os_if/linux/scan/src/wlan_cfg80211_scan.c | 2 +- os_if/linux/wifi_pos/src/os_if_wifi_pos.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/os_if/linux/scan/src/wlan_cfg80211_scan.c b/os_if/linux/scan/src/wlan_cfg80211_scan.c index f74554dfa9e4..414fbf3f06ae 100644 --- a/os_if/linux/scan/src/wlan_cfg80211_scan.c +++ b/os_if/linux/scan/src/wlan_cfg80211_scan.c @@ -718,7 +718,7 @@ static QDF_STATUS wlan_scan_request_dequeue( cfg80211_debug("Dequeue Scan id: %d", scan_id); - if ((source == NULL) || (req == NULL)) { + if ((!source) || (!req)) { cfg80211_err("source or request is NULL"); return QDF_STATUS_E_NULL_VALUE; } diff --git a/os_if/linux/wifi_pos/src/os_if_wifi_pos.c b/os_if/linux/wifi_pos/src/os_if_wifi_pos.c index e6297f4e7b53..e061c7310707 100644 --- a/os_if/linux/wifi_pos/src/os_if_wifi_pos.c +++ b/os_if/linux/wifi_pos/src/os_if_wifi_pos.c @@ -54,7 +54,7 @@ static void os_if_wifi_pos_send_rsp(uint32_t pid, uint32_t rsp_msg_type, } skb = alloc_skb(NLMSG_SPACE(sizeof(tAniMsgHdr) + buf_len), GFP_ATOMIC); - if (skb == NULL) { + if (!skb) { cfg80211_alert("alloc_skb failed"); return; }