qcacmn: hif: 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 hif replace any such comparisons with logical
operations performed on the pointer itself.
Change-Id: I929cb64ee0523d11bc86d5145aade1ec5a713071
CRs-Fixed: 2418257
diff --git a/hif/src/ce/ce_service_srng.c b/hif/src/ce/ce_service_srng.c
index 11eb2b1..56175a3 100644
--- a/hif/src/ce/ce_service_srng.c
+++ b/hif/src/ce/ce_service_srng.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-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
@@ -273,7 +273,7 @@
hal_srng_src_get_next(scn->hal_soc,
dest_ring->srng_ctx);
- if (dest_desc == NULL) {
+ if (!dest_desc) {
status = QDF_STATUS_E_FAILURE;
} else {
@@ -364,7 +364,7 @@
dest_status = hal_srng_dst_get_next(scn->hal_soc,
status_ring->srng_ctx);
- if (dest_status == NULL) {
+ if (!dest_status) {
status = QDF_STATUS_E_FAILURE;
goto done;
}
@@ -440,7 +440,7 @@
*per_transfer_contextp =
dest_ring->per_transfer_context[sw_index];
- if (dest_ring->per_transfer_context[sw_index] == NULL)
+ if (!dest_ring->per_transfer_context[sw_index])
return QDF_STATUS_E_FAILURE;
/* provide end condition */
@@ -805,7 +805,7 @@
struct pld_shadow_reg_v2_cfg **shadow_config,
int *num_shadow_registers_configured)
{
- if (scn->hal_soc == NULL) {
+ if (!scn->hal_soc) {
HIF_ERROR("%s: hal not initialized: not initializing shadow config",
__func__);
return;