提交 8756cd1d 编写于 作者: D Dan Carpenter 提交者: Rob Herring

of/unittest: Missing unlocks on error

Static checkers complain that we should unlock before returning.  Which
is true.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NFrank Rowand <frank.rowand@sony.com>
Signed-off-by: NRob Herring <robh@kernel.org>
上级 ee320b33
......@@ -2210,14 +2210,14 @@ static __init void of_unittest_overlay_high_level(void)
unittest(0,
"duplicate property '%s' in overlay_base node __symbols__",
prop->name);
return;
goto err_unlock;
}
ret = __of_add_property_sysfs(of_symbols, prop);
if (ret) {
unittest(0,
"unable to add property '%s' in overlay_base node __symbols__ to sysfs",
prop->name);
return;
goto err_unlock;
}
}
}
......@@ -2232,6 +2232,10 @@ static __init void of_unittest_overlay_high_level(void)
unittest(overlay_data_add(2),
"Adding overlay 'overlay_bad_phandle' failed\n");
return;
err_unlock:
mutex_unlock(&of_mutex);
}
#else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册