[v3,3/5] raw/ifpga/base: fix return of IRQ unregister properly
diff mbox series

Message ID 1603443599-7356-4-git-send-email-tianfei.zhang@intel.com
State Accepted, archived
Delegated to: Qi Zhang
Headers show
Series
  • raw/ifpga/base: An improvement for multi-process
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Zhang, Tianfei Oct. 23, 2020, 8:59 a.m. UTC
From: Wei Huang <wei.huang@intel.com>

Since 'rte_intr_callback_unregister()' can return positive
value as success, but 'ifpga_rawdev_destroy()' handle it as
an error.

Instead, only negative return is treated as failure.

Fixes: e0a1aafe ("raw/ifpga: introduce IRQ functions")
Cc: stable@dpdk.org

Signed-off-by: Wei Huang <wei.huang@intel.com>
Signed-off-by: Tianfei zhang <tianfei.zhang@intel.com>
---
 drivers/raw/ifpga/ifpga_rawdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index 374a7ff1d..04ca5032a 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -1564,7 +1564,7 @@  ifpga_rawdev_destroy(struct rte_pci_device *pci_dev)
 		return -ENODEV;
 
 	if (ifpga_unregister_msix_irq(IFPGA_FME_IRQ, 0,
-				fme_interrupt_handler, mgr))
+				fme_interrupt_handler, mgr) < 0)
 		return -EINVAL;
 
 	opae_adapter_data_free(adapter->data);