diff options
author | Sudarsana Reddy Kalluru <sudarsana.kalluru@cavium.com> | 2018-03-28 05:14:20 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-29 14:29:55 -0400 |
commit | d8bf47af24a28d90bbcd5d58d6dc6c5a40f4f91a (patch) | |
tree | 2aec81ecafc248a8d37026bbaf0b996bde244f83 | |
parent | 43645ce03e0063d7c4a5001215ca815188778881 (diff) | |
download | linux-d8bf47af24a28d90bbcd5d58d6dc6c5a40f4f91a.tar.bz2 |
qed: Fix PTT entry leak in the selftest error flow.
Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: Ariel Elior <ariel.elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed_selftest.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_selftest.c b/drivers/net/ethernet/qlogic/qed/qed_selftest.c index b88082f0b41a..cf1d4476f9d8 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_selftest.c +++ b/drivers/net/ethernet/qlogic/qed/qed_selftest.c @@ -128,7 +128,8 @@ int qed_selftest_nvram(struct qed_dev *cdev) rc = qed_mcp_bist_nvm_get_num_images(p_hwfn, p_ptt, &num_images); if (rc || !num_images) { DP_ERR(p_hwfn, "Failed getting number of images\n"); - return -EINVAL; + rc = -EINVAL; + goto err0; } /* Iterate over images and validate CRC */ |