Commit ef15d361 authored by Fabio Estevam's avatar Fabio Estevam Committed by Stefan Agner

drm/fsl-dcu: check for clk_prepare_enable() error

clk_prepare_enable() may fail, so we should better check its return
value.

Also place the of_node_put() function right after clk_prepare_enable(),
in order to avoid calling of_node_put() twice in case clk_prepare_enable()
fails.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: default avatarStefan Agner <stefan@agner.ch>
parent 5d2883d5
......@@ -87,9 +87,13 @@ struct fsl_tcon *fsl_tcon_init(struct device *dev)
goto err_node_put;
}
of_node_put(np);
clk_prepare_enable(tcon->ipg_clk);
ret = clk_prepare_enable(tcon->ipg_clk);
if (ret) {
dev_err(dev, "Couldn't enable the TCON clock\n");
goto err_node_put;
}
of_node_put(np);
dev_info(dev, "Using TCON in bypass mode\n");
return tcon;
......
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