mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
pcmcia: sa11x0: fix missing clk_put() in sa11x0 socket drivers
Fix the lack of clk_put() in sa11xx_base.c's error cleanup paths by
converting the driver to the devm_* API.
Fixes: 86d88bfca4
("ARM: 8247/2: pcmcia: sa1100: make use of device clock")
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
d770e558e2
commit
72010aca55
@ -93,7 +93,6 @@ static int sa11x0_drv_pcmcia_remove(struct platform_device *dev)
|
||||
for (i = 0; i < sinfo->nskt; i++)
|
||||
soc_pcmcia_remove_one(&sinfo->skt[i]);
|
||||
|
||||
clk_put(sinfo->clk);
|
||||
kfree(sinfo);
|
||||
return 0;
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
|
||||
int i, ret = 0;
|
||||
struct clk *clk;
|
||||
|
||||
clk = clk_get(dev, NULL);
|
||||
clk = devm_clk_get(dev, NULL);
|
||||
if (IS_ERR(clk))
|
||||
return PTR_ERR(clk);
|
||||
|
||||
@ -251,7 +251,6 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
|
||||
if (ret) {
|
||||
while (--i >= 0)
|
||||
soc_pcmcia_remove_one(&sinfo->skt[i]);
|
||||
clk_put(clk);
|
||||
kfree(sinfo);
|
||||
} else {
|
||||
dev_set_drvdata(dev, sinfo);
|
||||
|
Loading…
Reference in New Issue
Block a user