test/compress: fix missing header include
[dpdk.git] / drivers / net / failsafe / failsafe_intr.c
index f6ff04d..1c2cb71 100644 (file)
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2018 Mellanox Technologies, Ltd.
+ * Copyright 2018 Mellanox Technologies, Ltd
  */
 
 /**
@@ -372,7 +372,7 @@ void failsafe_rx_intr_uninstall_subdevice(struct sub_device *sdev)
        for (qid = 0; qid < ETH(sdev)->data->nb_rx_queues; qid++) {
                if (qid < fsdev->data->nb_rx_queues) {
                        fsrxq = fsdev->data->rx_queues[qid];
-                       if (fsrxq->enable_events)
+                       if (fsrxq != NULL && fsrxq->enable_events)
                                rte_eth_dev_rx_intr_disable(PORT_ID(sdev),
                                                            qid);
                }
@@ -523,7 +523,7 @@ failsafe_rx_intr_install(struct rte_eth_dev *dev)
        const struct rte_intr_conf *const intr_conf =
                        &priv->dev->data->dev_conf.intr_conf;
 
-       if (intr_conf->rxq == 0)
+       if (intr_conf->rxq == 0 || dev->intr_handle != NULL)
                return 0;
        if (fs_rx_intr_vec_install(priv) < 0)
                return -rte_errno;