slimbus: fix issue with unbalanced mutex

slimbus.c:1363 slim_config_mgrports() warn: inconsistent returns
'mutex:&ctrl->sched.m_reconf'

Bug: 77543262
Change-Id: If3be903db3b7c87f5cac78ba1123339cc2ed5bb4
Signed-off-by: David Lin <dtwlin@google.com>
This commit is contained in:
David Lin
2018-01-26 16:57:52 -08:00
parent 7a002fff86
commit 11aceafac2

View File

@@ -1355,8 +1355,10 @@ int slim_config_mgrports(struct slim_device *sb, u32 *ph, int nports,
for (i = 0; i < nports; i++) {
u8 pn = SLIM_HDL_TO_PORT(ph[i]);
if (ctrl->ports[pn].state == SLIM_P_CFG)
if (ctrl->ports[pn].state == SLIM_P_CFG) {
mutex_unlock(&ctrl->sched.m_reconf);
return -EISCONN;
}
ctrl->ports[pn].cfg = *cfg;
}
mutex_unlock(&ctrl->sched.m_reconf);