diff mbox

[1/6] drivers/rtc/rtc-wm831x.c: Return error if devm_request_threaded_irq fails

Message ID 1364208327-14207-2-git-send-email-sachin.kamat@linaro.org
State Superseded
Headers show

Commit Message

Sachin Kamat March 25, 2013, 10:45 a.m. UTC
wm831x_rtc_probe() returned 0 even if devm_request_threaded_irq failed.
Added 'goto' to return error code upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/rtc/rtc-wm831x.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Mark Brown March 25, 2013, 12:07 p.m. UTC | #1
On Mon, Mar 25, 2013 at 04:15:22PM +0530, Sachin Kamat wrote:
> wm831x_rtc_probe() returned 0 even if devm_request_threaded_irq failed.
> Added 'goto' to return error code upon failure.

No, this is intentional - we only need the interrupt to use the alarm
but the RTC works perfectly well without alarm support.
Sachin Kamat March 25, 2013, 2:30 p.m. UTC | #2
On 25 March 2013 17:37, Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> On Mon, Mar 25, 2013 at 04:15:22PM +0530, Sachin Kamat wrote:
>> wm831x_rtc_probe() returned 0 even if devm_request_threaded_irq failed.
>> Added 'goto' to return error code upon failure.
>
> No, this is intentional - we only need the interrupt to use the alarm
> but the RTC works perfectly well without alarm support.

Oh ok. I will drop this patch.
diff mbox

Patch

diff --git a/drivers/rtc/rtc-wm831x.c b/drivers/rtc/rtc-wm831x.c
index 8d65b94..862640e 100644
--- a/drivers/rtc/rtc-wm831x.c
+++ b/drivers/rtc/rtc-wm831x.c
@@ -450,6 +450,7 @@  static int wm831x_rtc_probe(struct platform_device *pdev)
 	if (ret != 0) {
 		dev_err(&pdev->dev, "Failed to request alarm IRQ %d: %d\n",
 			alm_irq, ret);
+		goto err;
 	}
 
 	wm831x_rtc_add_randomness(wm831x);