From 14c15f3e44e4ea1620a87623dca190c1bb821a2a Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Mon, 18 Mar 2019 13:45:45 -0700 Subject: [PATCH] qcacld-3.0: target_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 target_if replace any such comparisons with logical operations performed on the pointer itself. Change-Id: Id9b5185713b91b67ddf1d965a6c7e52508558d82 CRs-Fixed: 2418397 --- components/target_if/disa/src/target_if_disa.c | 4 ++-- components/target_if/pmo/src/target_if_pmo_lphb.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/target_if/disa/src/target_if_disa.c b/components/target_if/disa/src/target_if_disa.c index 055497d677578..5e37fac75fa77 100644 --- a/components/target_if/disa/src/target_if_disa.c +++ b/components/target_if/disa/src/target_if_disa.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -35,7 +35,7 @@ target_if_encrypt_decrypt_event_handler(ol_scn_t scn_handle, uint8_t *data, struct wlan_objmgr_psoc *psoc; wmi_unified_t wmi_handle; - if (data == NULL) { + if (!data) { target_if_err("%s: invalid pointer", __func__); return -EINVAL; } diff --git a/components/target_if/pmo/src/target_if_pmo_lphb.c b/components/target_if/pmo/src/target_if_pmo_lphb.c index fcf9dd46eca74..02c79de6d0542 100644 --- a/components/target_if/pmo/src/target_if_pmo_lphb.c +++ b/components/target_if/pmo/src/target_if_pmo_lphb.c @@ -113,7 +113,7 @@ QDF_STATUS target_if_pmo_send_lphb_tcp_pkt_filter(struct wlan_objmgr_psoc *psoc, wmi_hb_set_tcp_pkt_filter_cmd_fixed_param hb_tcp_filter_fp = {0}; wmi_unified_t wmi_handle; - if (ts_lphb_tcp_filter == NULL) { + if (!ts_lphb_tcp_filter) { target_if_err("TCP PKT FILTER LPHB configuration is NULL"); return QDF_STATUS_E_FAILURE; }