diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-05-31 20:01:30 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-03 14:23:32 -0700 |
commit | c265a0d5152619bddcf1986f17995d2df6781554 (patch) | |
tree | a12aedb8a70c6f45d507206f7d6fa9c7cff00cd0 /drivers/misc | |
parent | fca597558e47f936a0e03bab15af726aa3a0fa0e (diff) | |
download | linux-c265a0d5152619bddcf1986f17995d2df6781554.tar.bz2 |
pcie-gadget-spear: fix error return code in spear_pcie_gadget_probe()
Fix to return a negative error code in the clk_get_sys() and clk_enable()
error handling case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/spear13xx_pcie_gadget.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/misc/spear13xx_pcie_gadget.c b/drivers/misc/spear13xx_pcie_gadget.c index 84a8dabc18fb..4ba0ea352968 100644 --- a/drivers/misc/spear13xx_pcie_gadget.c +++ b/drivers/misc/spear13xx_pcie_gadget.c @@ -814,9 +814,11 @@ static int spear_pcie_gadget_probe(struct platform_device *pdev) clk = clk_get_sys("pcie1", NULL); if (IS_ERR(clk)) { pr_err("%s:couldn't get clk for pcie1\n", __func__); + status = PTR_ERR(clk); goto err_irq; } - if (clk_enable(clk)) { + status = clk_enable(clk); + if (status) { pr_err("%s:couldn't enable clk for pcie1\n", __func__); goto err_irq; } @@ -828,9 +830,11 @@ static int spear_pcie_gadget_probe(struct platform_device *pdev) clk = clk_get_sys("pcie2", NULL); if (IS_ERR(clk)) { pr_err("%s:couldn't get clk for pcie2\n", __func__); + status = PTR_ERR(clk); goto err_irq; } - if (clk_enable(clk)) { + status = clk_enable(clk); + if (status) { pr_err("%s:couldn't enable clk for pcie2\n", __func__); goto err_irq; } |