[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1409484115-1974-2-git-send-email-pramod.gurav@smartplayin.com>
Date: Sun, 31 Aug 2014 16:51:52 +0530
From: Pramod Gurav <pramod.gurav@...rtplayin.com>
To: linux-kernel@...r.kernel.org
Cc: Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
Linus Walleij <linus.walleij@...aro.org>
Subject: [PATCH 1/4] pinctrl: at91: Switch to using managed clk_get
This patch switches to using managed version of clk_get and hence
removes clk_put from failure path.
CC: Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>
CC: Linus Walleij <linus.walleij@...aro.org>
Signed-off-by: Pramod Gurav <pramod.gurav@...rtplayin.com>
---
drivers/pinctrl/pinctrl-at91.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index af1ba4f..480460d 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -1575,14 +1575,14 @@ static int at91_gpio_probe(struct platform_device *pdev)
at91_chip->pioc_virq = irq;
at91_chip->pioc_idx = alias_idx;
- at91_chip->clock = clk_get(&pdev->dev, NULL);
+ at91_chip->clock = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(at91_chip->clock)) {
dev_err(&pdev->dev, "failed to get clock, ignoring.\n");
goto err;
}
if (clk_prepare(at91_chip->clock))
- goto clk_prep_err;
+ goto err;
/* enable PIO controller's clock */
if (clk_enable(at91_chip->clock)) {
@@ -1645,8 +1645,6 @@ static int at91_gpio_probe(struct platform_device *pdev)
clk_err:
clk_unprepare(at91_chip->clock);
-clk_prep_err:
- clk_put(at91_chip->clock);
err:
dev_err(&pdev->dev, "Failure %i for GPIO %i\n", ret, alias_idx);
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists