From: Gagandeep Singh <[email protected]>

Fix an incorrect condition check when unregistering the interrupt
handler during device stop. The check was using the wrong
comparison which could cause the unregister to be skipped.

Fixes: 9c99878aa1 ("log: introduce logtype register macro")
Cc: [email protected]

Signed-off-by: Gagandeep Singh <[email protected]>
---
 drivers/net/dpaa/dpaa_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 9a9c5ee817..c143e66f77 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -559,7 +559,7 @@ static int dpaa_eth_dev_close(struct rte_eth_dev *dev)
                }
                ret = rte_intr_callback_unregister(intr_handle,
                        dpaa_interrupt_handler, (void *)dev);
-               if (ret) {
+               if (ret < 0) {
                        DPAA_PMD_WARN("%s: unregister interrupt failed(%d)",
                                dev->data->name, ret);
                }
-- 
2.43.0

Reply via email to