slimbus: fix inconsistent mutex_lock

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

Change-Id: I023f69cc3496e9b98d9881c447fc1bf9053de97f
Signed-off-by: David Lin <dtwlin@google.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
This commit is contained in:
David Lin 2017-06-01 21:00:09 -07:00 committed by Timi
parent c1803f5a48
commit 453bcffbe8

View file

@ -1323,8 +1323,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);