Use devm_clk_get() to get the clock for the LCD.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
if (!fbi)
goto failed;
- fbi->clk = clk_get(&pdev->dev, NULL);
+ fbi->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(fbi->clk)) {
ret = PTR_ERR(fbi->clk);
- fbi->clk = NULL;
goto failed;
}
failed:
if (fbi)
iounmap(fbi->base);
- if (fbi->clk)
- clk_put(fbi->clk);
release_mem_region(res->start, resource_size(res));
return ret;
}