From 6ca2bcb767ee8215b681da4981d0c1bf38a04570 Mon Sep 17 00:00:00 2001 From: Bhadram Varka Date: Sun, 21 Mar 2021 17:20:33 +0530 Subject: [PATCH] osi: core: fix coverity issues Defects/Coding rule violations found : 3 Total FORWARD_NULL 1 - (Deviation Not approved) UNUSED_VALUE 2 - (Deviation Not approved) Bug 200671160 Change-Id: Icabb21606a5758ad79e92d9d67e2be9cb889723e Signed-off-by: Bhadram Varka --- osi/core/eqos_core.c | 2 +- osi/core/osi_core.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/osi/core/eqos_core.c b/osi/core/eqos_core.c index 6aa2ec1..c4c48c0 100644 --- a/osi/core/eqos_core.c +++ b/osi/core/eqos_core.c @@ -3038,7 +3038,7 @@ static nve32_t eqos_adjust_mactime(struct osi_core_priv_data *const osi_core, } /* write seconds value to MAC_System_Time_Seconds_Update register */ - osi_writela(osi_core, sec, (nveu8_t *)addr + EQOS_MAC_STSUR); + osi_writela(osi_core, sec1, (nveu8_t *)addr + EQOS_MAC_STSUR); /* write nano seconds value and add_sub to * MAC_System_Time_Nanoseconds_Update register diff --git a/osi/core/osi_core.c b/osi/core/osi_core.c index 52be9c0..f341918 100644 --- a/osi/core/osi_core.c +++ b/osi/core/osi_core.c @@ -130,8 +130,6 @@ nve32_t osi_init_core_ops(struct osi_core_priv_data *const osi_core) (osi_core->osd_ops.udelay == OSI_NULL) || (osi_core->osd_ops.msleep == OSI_NULL) || (osi_core->osd_ops.usleep_range == OSI_NULL)) { - OSI_CORE_ERR(OSI_NULL, OSI_LOG_ARG_INVALID, - "CORE OSD ops not assigned\n", 0ULL); return -1; } @@ -282,7 +280,7 @@ nve32_t osi_config_fw_err_pkts(struct osi_core_priv_data *const osi_core, nve32_t osi_l2_filter(struct osi_core_priv_data *const osi_core, const struct osi_filter *filter) { - nve32_t ret = -1; + nve32_t ret; if ((validate_args(osi_core) < 0) || (filter == OSI_NULL)) { return -1;