mirror of
https://github.com/torvalds/linux.git
synced 2026-03-13 22:36:17 +01:00
firmware: imx: scu: Use devm_mutex_init
In normal case, there is no need to invoke mutex_destroy in error path, but it is useful when CONFIG_DEBUG_MUTEXES, so use devm_mutex_init(). Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
This commit is contained in:
parent
ff79af939d
commit
97a07dd2b5
1 changed files with 3 additions and 1 deletions
|
|
@ -324,7 +324,9 @@ static int imx_scu_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
sc_ipc->dev = dev;
|
||||
mutex_init(&sc_ipc->lock);
|
||||
ret = devm_mutex_init(dev, &sc_ipc->lock);
|
||||
if (ret)
|
||||
return ret;
|
||||
init_completion(&sc_ipc->done);
|
||||
|
||||
imx_sc_ipc_handle = sc_ipc;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue