On 01/04/14 11:59, Geert Uytterhoeven wrote:
On Tue, Apr 1, 2014 at 12:25 PM, Ben Dooks <[email protected]> wrote:- host->hclk = clk_get(&pdev->dev, NULL); + host->hclk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(host->hclk)) { ret = PTR_ERR(host->hclk); dev_err(&pdev->dev, "cannot get clock: %d\n", ret); - goto eclkget; + goto err_pm; } ret = sh_mmcif_clk_update(host); if (ret < 0) - goto eclkupdate; + goto err_clk;This goto doesn't look correct to me. If sh_mmcif_clk_update() failed, the clock was not enabled nor prepared. "goto err_pm"?
Yes, I think the clk_prepare_enable() call there is the only failure mode. As a note, we should probably check all systems that use it and see if we can remove the clock management code in here as the pm_runtime will also be doing this. -- Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
