Skip to contentSkip to conversation

+ rtc-rtc-imxdi-check-the-return-value-from-clk_prepare_enable.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Jan 27, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Subject: + rtc-rtc-imxdi-check-the-return-value-from-clk_prepare_enable.patch added to -mm tree
To: [email protected]
From: [email protected]
Date: Mon, 27 Jan 2014 15:08:08 -0800

The patch titled
Subject: drivers/rtc/rtc-imxdi.c: check the return value from clk_prepare_enable()
has been added to the -mm tree. Its filename is
rtc-rtc-imxdi-check-the-return-value-from-clk_prepare_enable.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/rtc-rtc-imxdi-check-the-return-value-from-clk_prepare_enable.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/rtc-rtc-imxdi-check-the-return-value-from-clk_prepare_enable.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Fabio Estevam <[email protected]>
Subject: drivers/rtc/rtc-imxdi.c: check the return value from clk_prepare_enable()

clk_prepare_enable() may fail, so let's check its return value and propagate it in the case of error.

---

 drivers/rtc/rtc-imxdi.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/rtc/rtc-imxdi.c renamed from drivers/rtc/rtc-imxdi.c~rtc-rtc-imxdi-check-the-return-value-from-clk_prepare_enable +3 -1
diff -puN drivers/rtc/rtc-imxdi.c~rtc-rtc-imxdi-check-the-return-value-from-clk_prepare_enable drivers/rtc/rtc-imxdi.c
@@ -401,7 +401,9 @@ static int __init dryice_rtc_probe(struc
 	imxdi->clk = devm_clk_get(&pdev->dev, NULL);
 	if (IS_ERR(imxdi->clk))
 		return PTR_ERR(imxdi->clk);
-	clk_prepare_enable(imxdi->clk);
+	rc = clk_prepare_enable(imxdi->clk);
+	if (rc)
+		return rc;
 
 	/*
 	 * Initialize dryice hardware

_

Patches currently in -mm which might be from [email protected] are

origin.patch rtc-rtc-imxdi-check-the-return-value-from-clk_prepare_enable.patch linux-next.patch