diff --git a/components/pmo/core/src/wlan_pmo_lphb.c b/components/pmo/core/src/wlan_pmo_lphb.c index 2ee672a9ee80..9ca0be70d13d 100644 --- a/components/pmo/core/src/wlan_pmo_lphb.c +++ b/components/pmo/core/src/wlan_pmo_lphb.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-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 @@ -42,7 +42,7 @@ static QDF_STATUS pmo_core_send_lphb_enable(struct wlan_objmgr_psoc *psoc, struct pmo_lphb_enable_req *ts_lphb_enable; int i; - if (lphb_conf_req == NULL) { + if (!lphb_conf_req) { pmo_err("LPHB configuration is NULL"); return QDF_STATUS_E_FAILURE; } @@ -214,7 +214,7 @@ QDF_STATUS pmo_core_lphb_config_req(struct wlan_objmgr_psoc *psoc, { struct pmo_psoc_priv_obj *psoc_ctx; - if (lphb_req == NULL) { + if (!lphb_req) { pmo_err("LPHB configuration is NULL"); return QDF_STATUS_E_NULL_VALUE; } diff --git a/components/pmo/core/src/wlan_pmo_main.c b/components/pmo/core/src/wlan_pmo_main.c index ee45260dcd3a..81a2755d07a2 100644 --- a/components/pmo/core/src/wlan_pmo_main.c +++ b/components/pmo/core/src/wlan_pmo_main.c @@ -31,7 +31,7 @@ static struct wlan_pmo_ctx *gp_pmo_ctx; QDF_STATUS pmo_allocate_ctx(void) { /* If it is already created, ignore */ - if (gp_pmo_ctx != NULL) { + if (gp_pmo_ctx) { pmo_debug("already allocated pmo_ctx"); return QDF_STATUS_SUCCESS; } diff --git a/components/pmo/dispatcher/src/wlan_pmo_obj_mgmt_api.c b/components/pmo/dispatcher/src/wlan_pmo_obj_mgmt_api.c index 798e853c56e1..291abb5cc1b6 100644 --- a/components/pmo/dispatcher/src/wlan_pmo_obj_mgmt_api.c +++ b/components/pmo/dispatcher/src/wlan_pmo_obj_mgmt_api.c @@ -157,7 +157,7 @@ QDF_STATUS pmo_psoc_object_created_notification( } psoc_ctx = qdf_mem_malloc(sizeof(*psoc_ctx)); - if (psoc_ctx == NULL) { + if (!psoc_ctx) { pmo_err("Failed to allocate pmo_psoc"); status = QDF_STATUS_E_NOMEM; goto out; @@ -241,7 +241,7 @@ QDF_STATUS pmo_vdev_object_created_notification( psoc_ctx = pmo_psoc_get_priv(psoc); vdev_ctx = qdf_mem_malloc(sizeof(*vdev_ctx)); - if (vdev_ctx == NULL) { + if (!vdev_ctx) { pmo_err("Failed to allocate vdev_ctx"); status = QDF_STATUS_E_NOMEM; goto out; diff --git a/components/pmo/dispatcher/src/wlan_pmo_tgt_pkt_filter.c b/components/pmo/dispatcher/src/wlan_pmo_tgt_pkt_filter.c index 0ae1146b1690..5094fd735d5d 100644 --- a/components/pmo/dispatcher/src/wlan_pmo_tgt_pkt_filter.c +++ b/components/pmo/dispatcher/src/wlan_pmo_tgt_pkt_filter.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-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 @@ -50,7 +50,7 @@ QDF_STATUS pmo_tgt_set_pkt_filter(struct wlan_objmgr_vdev *vdev, request_buf = qdf_mem_malloc(sizeof(*request_buf)); - if (request_buf == NULL) { + if (!request_buf) { pmo_err("Not able to allocate memory for Receive Filter Set Filter request"); status = QDF_STATUS_E_NOMEM; goto out; @@ -114,7 +114,7 @@ QDF_STATUS pmo_tgt_clear_pkt_filter(struct wlan_objmgr_vdev *vdev, request_buf = qdf_mem_malloc(sizeof(*request_buf)); - if (request_buf == NULL) { + if (!request_buf) { pmo_err("Not able to allocate memory for Receive Filter Set Filter request"); status = QDF_STATUS_E_NOMEM; goto out;