summaryrefslogtreecommitdiffstats
path: root/drivers/clk/at91
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>2015-09-11 16:34:07 +0200
committerStephen Boyd <sboyd@codeaurora.org>2015-09-16 15:22:22 -0700
commita97cea2a5cfb1e66716226ea258251317acd8ffe (patch)
tree3cab7180eabda73ca2beb449ae642d5577c61861 /drivers/clk/at91
parentde661d002229c6c02e99e242fd5fc1f1da2fbe3b (diff)
downloadlinux-a97cea2a5cfb1e66716226ea258251317acd8ffe.tar.gz
linux-a97cea2a5cfb1e66716226ea258251317acd8ffe.tar.bz2
linux-a97cea2a5cfb1e66716226ea258251317acd8ffe.zip
clk: at91: system: don't try to free_irq when there is no IRQ
In the error path of at91_clk_register_system(), sys->irq is freed unconditionally but it may not exist or be request at all. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/at91')
-rw-r--r--drivers/clk/at91/clk-system.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/clk/at91/clk-system.c b/drivers/clk/at91/clk-system.c
index 58008b3e8bc1..3f5314344286 100644
--- a/drivers/clk/at91/clk-system.c
+++ b/drivers/clk/at91/clk-system.c
@@ -138,7 +138,8 @@ at91_clk_register_system(struct at91_pmc *pmc, const char *name,
clk = clk_register(NULL, &sys->hw);
if (IS_ERR(clk)) {
- free_irq(sys->irq, sys);
+ if (irq)
+ free_irq(sys->irq, sys);
kfree(sys);
}