Commit 8756cd1d authored by Dan Carpenter's avatar Dan Carpenter Committed by Rob Herring

of/unittest: Missing unlocks on error

Static checkers complain that we should unlock before returning.  Which
is true.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarFrank Rowand <frank.rowand@sony.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment