From 2d46b475ecc4be1d07d96b66aed66f94fafc8f3f Mon Sep 17 00:00:00 2001 From: Srinivas Ramachandran Date: Thu, 26 Dec 2019 12:23:54 -0800 Subject: [PATCH] nvethernetrm: Fix validation of incorrect func. pointer Issue: The OSI interface API osi_configure_eee validates function pointer osi_core_ops->core_init instead of osi_core_ops->configure_eee. This is a copy paste error. Fix: Validate the correct function pointer osi_core_ops->configure_eee. Bug 2594864 Change-Id: I9e291f03debf508c80cff0a9d63af872faa7856b Signed-off-by: Srinivas Ramachandran Reviewed-on: https://git-master.nvidia.com/r/2269269 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: svc-mobile-cert Reviewed-by: Bhadram Varka Reviewed-by: Narayan Reddy GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani Reviewed-by: mobile promotions Tested-by: mobile promotions --- osi/core/osi_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osi/core/osi_core.c b/osi/core/osi_core.c index 07384c1..7893876 100644 --- a/osi/core/osi_core.c +++ b/osi/core/osi_core.c @@ -921,7 +921,7 @@ int osi_configure_eee(struct osi_core_priv_data *osi_core, unsigned int tx_lpi_enabled, unsigned int tx_lpi_timer) { if ((osi_core != OSI_NULL) && (osi_core->ops != OSI_NULL) && - (osi_core->ops->core_init != OSI_NULL) && + (osi_core->ops->configure_eee != OSI_NULL) && (tx_lpi_timer <= OSI_MAX_TX_LPI_TIMER) && (tx_lpi_timer >= OSI_MIN_TX_LPI_TIMER) && (tx_lpi_timer % OSI_MIN_TX_LPI_TIMER == OSI_NONE)) {