linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Jingoo Han <jg1.han@samsung.com>
To: 'Brian Norris' <computersforpeace@gmail.com>
Cc: linux-mtd@lists.infradead.org, 'Jingoo Han' <jg1.han@samsung.com>,
	'David Woodhouse' <dwmw2@infradead.org>,
	'Dinh Nguyen' <dinguyen@altera.com>
Subject: [PATCH V2 4/8] mtd: denali_dt: Use devm_clk_get()
Date: Fri, 20 Dec 2013 16:33:08 +0900	[thread overview]
Message-ID: <001101cefd55$ba9e3120$2fda9360$%han@samsung.com> (raw)
In-Reply-To: <000d01cefd55$7e48a2a0$7ad9e7e0$%han@samsung.com>

Use devm_clk_get() to make cleanup paths simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
No change since v1.

 drivers/mtd/nand/denali_dt.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/denali_dt.c
index 9253024..babb02c 100644
--- a/drivers/mtd/nand/denali_dt.c
+++ b/drivers/mtd/nand/denali_dt.c
@@ -108,7 +108,7 @@ static int denali_dt_probe(struct platform_device *ofdev)
 		denali->dev->dma_mask = NULL;
 	}
 
-	dt->clk = clk_get(&ofdev->dev, NULL);
+	dt->clk = devm_clk_get(&ofdev->dev, NULL);
 	if (IS_ERR(dt->clk)) {
 		dev_err(&ofdev->dev, "no clk available\n");
 		return PTR_ERR(dt->clk);
@@ -124,7 +124,6 @@ static int denali_dt_probe(struct platform_device *ofdev)
 
 out_disable_clk:
 	clk_disable_unprepare(dt->clk);
-	clk_put(dt->clk);
 
 	return ret;
 }
@@ -135,7 +134,6 @@ static int denali_dt_remove(struct platform_device *ofdev)
 
 	denali_remove(&dt->denali);
 	clk_disable(dt->clk);
-	clk_put(dt->clk);
 
 	return 0;
 }
-- 
1.7.10.4

  parent reply	other threads:[~2013-12-20  7:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-20  7:31 [PATCH V2 1/8] mtd: docg3: Use devm_*() functions Jingoo Han
2013-12-20  7:32 ` [PATCH V2 2/8] mtd: ixp4xx: " Jingoo Han
2013-12-20  7:32 ` [PATCH V2 3/8] mtd: lantiq-flash: Use devm_kzalloc() Jingoo Han
2013-12-20  8:41   ` John Crispin
2013-12-20 15:38   ` Ezequiel Garcia
2013-12-26  1:24     ` Jingoo Han
2013-12-20  7:33 ` Jingoo Han [this message]
2013-12-20  7:33 ` [PATCH V2 5/8] mtd: lpc32xx_slc: Use devm_*() functions Jingoo Han
2013-12-20  7:34 ` [PATCH V2 6/8] mtd: nuc900_nand: " Jingoo Han
2013-12-20  7:34 ` [PATCH V2 7/8] mtd: plat_nand: " Jingoo Han
2013-12-20  7:35 ` [PATCH V2 8/8] mtd: tmio_nand: " Jingoo Han

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001101cefd55$ba9e3120$2fda9360$%han@samsung.com' \
    --to=jg1.han@samsung.com \
    --cc=computersforpeace@gmail.com \
    --cc=dinguyen@altera.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).