]> git.droids-corp.org - dpdk.git/commitdiff
net/sfc: fix lock releases
authorIvan Malov <ivan.malov@oktetlabs.ru>
Mon, 7 Feb 2022 11:15:59 +0000 (14:15 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 7 Feb 2022 12:39:47 +0000 (13:39 +0100)
Fixes: 155583abe63c ("net/sfc: implement representor queue setup and release")
Fixes: 75f080fdf74a ("net/sfc: implement port representor start and stop")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/sfc/sfc_repr_proxy.c

index 535b07ea524c82ab1551e8c9c84159bf2da2b387..8660d419a3c52681d384b74517c730e7c8b73eb7 100644 (file)
@@ -1413,6 +1413,7 @@ sfc_repr_proxy_add_rxq(uint16_t pf_port_id, uint16_t repr_id,
        port = sfc_repr_proxy_find_port(rp, repr_id);
        if (port == NULL) {
                sfc_err(sa, "%s() failed: no such port", __func__);
+               sfc_put_adapter(sa);
                return ENOENT;
        }
 
@@ -1451,6 +1452,7 @@ sfc_repr_proxy_del_rxq(uint16_t pf_port_id, uint16_t repr_id,
        port = sfc_repr_proxy_find_port(rp, repr_id);
        if (port == NULL) {
                sfc_err(sa, "%s() failed: no such port", __func__);
+               sfc_put_adapter(sa);
                return;
        }
 
@@ -1484,6 +1486,7 @@ sfc_repr_proxy_add_txq(uint16_t pf_port_id, uint16_t repr_id,
        port = sfc_repr_proxy_find_port(rp, repr_id);
        if (port == NULL) {
                sfc_err(sa, "%s() failed: no such port", __func__);
+               sfc_put_adapter(sa);
                return ENOENT;
        }
 
@@ -1516,6 +1519,7 @@ sfc_repr_proxy_del_txq(uint16_t pf_port_id, uint16_t repr_id,
        port = sfc_repr_proxy_find_port(rp, repr_id);
        if (port == NULL) {
                sfc_err(sa, "%s() failed: no such port", __func__);
+               sfc_put_adapter(sa);
                return;
        }
 
@@ -1614,6 +1618,7 @@ sfc_repr_proxy_stop_repr(uint16_t pf_port_id, uint16_t repr_id)
        port = sfc_repr_proxy_find_port(rp, repr_id);
        if (port == NULL) {
                sfc_err(sa, "%s() failed: no such port", __func__);
+               sfc_put_adapter(sa);
                return ENOENT;
        }