Skip to content

Commit

Permalink
net: ena: add missing return when ena_com_get_io_handlers() fails
Browse files Browse the repository at this point in the history
Fixes: 1738cd3 ("Add a driver for Amazon Elastic Network Adapters (ENA)")
Signed-off-by: Netanel Belgazal <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
NetanelBelgazal authored and davem330 committed Jun 11, 2017
1 parent 418df30 commit 2d2c600
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/amazon/ena/ena_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1543,6 +1543,7 @@ static int ena_create_io_tx_queue(struct ena_adapter *adapter, int qid)
"Failed to get TX queue handlers. TX queue num %d rc: %d\n",
qid, rc);
ena_com_destroy_io_queue(ena_dev, ena_qid);
return rc;
}

ena_com_update_numa_node(tx_ring->ena_com_io_cq, ctx.numa_node);
Expand Down Expand Up @@ -1607,6 +1608,7 @@ static int ena_create_io_rx_queue(struct ena_adapter *adapter, int qid)
"Failed to get RX queue handlers. RX queue num %d rc: %d\n",
qid, rc);
ena_com_destroy_io_queue(ena_dev, ena_qid);
return rc;
}

ena_com_update_numa_node(rx_ring->ena_com_io_cq, ctx.numa_node);
Expand Down

0 comments on commit 2d2c600

Please sign in to comment.