mirror of https://gitee.com/openkylin/linux.git
be2net: release mcc-lock in a failure case in be_cmd_notify_wait()
The mcc/mbox lock is not being released when be_cmd_copy() returns an error. Signed-off-by: Suresh Reddy <suresh.reddy@avagotech.com> Signed-off-by: Sathya Perla <sathya.perla@avagotech.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ae4a9d6a63
commit
0c8845679f
|
@ -851,8 +851,10 @@ static int be_cmd_notify_wait(struct be_adapter *adapter,
|
|||
return status;
|
||||
|
||||
dest_wrb = be_cmd_copy(adapter, wrb);
|
||||
if (!dest_wrb)
|
||||
return -EBUSY;
|
||||
if (!dest_wrb) {
|
||||
status = -EBUSY;
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
if (use_mcc(adapter))
|
||||
status = be_mcc_notify_wait(adapter);
|
||||
|
@ -862,6 +864,7 @@ static int be_cmd_notify_wait(struct be_adapter *adapter,
|
|||
if (!status)
|
||||
memcpy(wrb, dest_wrb, sizeof(*wrb));
|
||||
|
||||
unlock:
|
||||
be_cmd_unlock(adapter);
|
||||
return status;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue