diff options
author | Simon Baatz <gmbnomis@gmail.com> | 2012-07-19 02:04:09 +0400 |
---|---|---|
committer | Andrew Lunn <andrew@lunn.ch> | 2012-07-25 19:06:21 +0400 |
commit | baffab28b13120694fa3ebab08d3e99667a851d2 (patch) | |
tree | ba6021fe52fd1814b06ab07ba2aa8f51c6c2da06 /drivers/mtd | |
parent | 30e0f58035073c895a8d33e1521e412be73e02bc (diff) | |
download | linux-baffab28b13120694fa3ebab08d3e99667a851d2.tar.xz |
ARM: Orion: fix driver probe error handling with respect to clk
The clk patches added code to get and enable clocks in the
respective driver probe functions. If the probe function failed
for some reason after enabling the clock, the clock was not
disabled again in many cases.
Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
Signed-off-by: Andrew Lumm <andrew@lunn.ch>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/orion_nand.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c index 513dc88a05ca..9b8fd3d77168 100644 --- a/drivers/mtd/nand/orion_nand.c +++ b/drivers/mtd/nand/orion_nand.c @@ -183,6 +183,10 @@ static int __init orion_nand_probe(struct platform_device *pdev) return 0; no_dev: + if (!IS_ERR(clk)) { + clk_disable_unprepare(clk); + clk_put(clk); + } platform_set_drvdata(pdev, NULL); iounmap(io_base); no_res: |