Skip to content

Commit

Permalink
Merge tag 'drm-fsl-dcu-for-v4.11' of http://git.agner.ch/git/linux-dr…
Browse files Browse the repository at this point in the history
…m-fsl-dcu into drm-next

two minor fixes.

* tag 'drm-fsl-dcu-for-v4.11' of http://git.agner.ch/git/linux-drm-fsl-dcu:
  drm/fsl-dcu: check for clk_prepare_enable() error
  drm/fsl-dcu: remove unneeded 'ret' assignment
  • Loading branch information
Dave Airlie committed Feb 10, 2017
2 parents 79b3349 + ef15d36 commit f320d35
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions drivers/gpu/drm/fsl-dcu/fsl_tcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,8 @@ struct fsl_tcon *fsl_tcon_init(struct device *dev)
return NULL;

tcon = devm_kzalloc(dev, sizeof(*tcon), GFP_KERNEL);
if (!tcon) {
ret = -ENOMEM;
if (!tcon)
goto err_node_put;
}

ret = fsl_tcon_init_regmap(dev, tcon, np);
if (ret) {
Expand All @@ -89,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;
Expand Down

0 comments on commit f320d35

Please sign in to comment.