From: Rasesh Mody Date: Tue, 19 Sep 2017 01:51:27 +0000 (-0700) Subject: net/qede/base: handle the error condition properly X-Git-Tag: spdx-start~1905 X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=c83cbe7130656a65b16078bfb1c008f9a15a4a9b net/qede/base: handle the error condition properly If for some reason the send message from VF to PF times out, don't bail out right away without taking proper cleanup action. The goto statement calls ecore_vf_pf_req_end() which will unlock the mutex previously held. Signed-off-by: Rasesh Mody --- diff --git a/drivers/net/qede/base/ecore_vf.c b/drivers/net/qede/base/ecore_vf.c index 97ed0b77a0..e84f97ac54 100644 --- a/drivers/net/qede/base/ecore_vf.c +++ b/drivers/net/qede/base/ecore_vf.c @@ -237,10 +237,8 @@ static enum _ecore_status_t ecore_vf_pf_acquire(struct ecore_hwfn *p_hwfn) /* send acquire request */ rc = ecore_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp)); - - /* PF timeout */ - if (rc) - return rc; + if (rc != ECORE_SUCCESS) + goto exit; /* copy acquire response from buffer to p_hwfn */ OSAL_MEMCPY(&p_iov->acquire_resp,