From: Shai Brandes <shaib...@amazon.com>

Removed the sign inversion for when checking if
ena_com_set_host_attributes returns ENA_COM_UNSUPPORTED.
ENA_COM_UNSUPPORTED is defined as -EOPNOTSUPP, so the extra sign
inversion is wrong.

Fixes: 3adcba9a8987 ("net/ena: update HAL to the newer version")
Cc: sta...@dpdk.org

Signed-off-by: Shai Brandes <shaib...@amazon.com>
---
 doc/guides/rel_notes/release_24_07.rst | 1 +
 drivers/net/ena/ena_ethdev.c           | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/doc/guides/rel_notes/release_24_07.rst 
b/doc/guides/rel_notes/release_24_07.rst
index f000dec54b..24bb91ad46 100644
--- a/doc/guides/rel_notes/release_24_07.rst
+++ b/doc/guides/rel_notes/release_24_07.rst
@@ -79,6 +79,7 @@ New Features
   * Reworked the device uninitialization flow to ensure complete resource
     cleanup and lay the groundwork for hot-unplug support.
   * Removed an obsolete workaround for a false L4 bad Rx checksum indication.
+  * Fixed an invalid return value check.
 
 * **Update Tap PMD driver.**
 
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index b43b913903..67a1d86f9a 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -812,7 +812,7 @@ static void ena_config_host_info(struct ena_com_dev 
*ena_dev)
 
        rc = ena_com_set_host_attributes(ena_dev);
        if (rc) {
-               if (rc == -ENA_COM_UNSUPPORTED)
+               if (rc == ENA_COM_UNSUPPORTED)
                        PMD_DRV_LOG(WARNING, "Cannot set host attributes\n");
                else
                        PMD_DRV_LOG(ERR, "Cannot set host attributes\n");
@@ -856,7 +856,7 @@ static void ena_config_debug_area(struct ena_adapter 
*adapter)
 
        rc = ena_com_set_host_attributes(&adapter->ena_dev);
        if (rc) {
-               if (rc == -ENA_COM_UNSUPPORTED)
+               if (rc == ENA_COM_UNSUPPORTED)
                        PMD_DRV_LOG(WARNING, "Cannot set host attributes\n");
                else
                        PMD_DRV_LOG(ERR, "Cannot set host attributes\n");
-- 
2.17.1

Reply via email to