mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 20:14:06 +02:00
RDMA/bnxt_re: Optimize error handling in bnxt_re_probe
Optimize error handling path in bnxt_re_probe by removing some duplicate code. Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Link: https://patch.msgid.link/1733888745-30939-4-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
ae51cb9821
commit
55992c3862
|
|
@ -2321,13 +2321,9 @@ static int bnxt_re_probe(struct auxiliary_device *adev,
|
|||
|
||||
rc = bnxt_re_add_device(adev, BNXT_RE_COMPLETE_INIT);
|
||||
if (rc)
|
||||
goto err;
|
||||
mutex_unlock(&bnxt_re_mutex);
|
||||
return 0;
|
||||
kfree(en_info);
|
||||
|
||||
err:
|
||||
mutex_unlock(&bnxt_re_mutex);
|
||||
kfree(en_info);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user