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>
This commit is contained in:
Sudarsana Reddy Kalluru 2018-03-28 05:14:20 -07:00 committed by David S. Miller
parent 43645ce03e
commit d8bf47af24
1 changed files with 2 additions and 1 deletions

View File

@ -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 */