Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753653Ab3EMG0E (ORCPT ); Mon, 13 May 2013 02:26:04 -0400 Received: from mail-bk0-f54.google.com ([209.85.214.54]:57267 "EHLO mail-bk0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753247Ab3EMG0B (ORCPT ); Mon, 13 May 2013 02:26:01 -0400 MIME-Version: 1.0 Date: Mon, 13 May 2013 14:26:00 +0800 Message-ID: Subject: [PATCH] rtc: rtc-vr41xx: fix error return code in rtc_probe() From: Wei Yongjun To: a.zummo@towertech.it, akpm@linux-foundation.org Cc: yongjun_wei@trendmicro.com.cn, rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1034 Lines: 32 From: Wei Yongjun Fix to return -EBUSY in the platform irq get error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/rtc/rtc-vr41xx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c index 3b5b4fa..54e104e 100644 --- a/drivers/rtc/rtc-vr41xx.c +++ b/drivers/rtc/rtc-vr41xx.c @@ -339,8 +339,10 @@ static int rtc_probe(struct platform_device *pdev) goto err_device_unregister; pie_irq = platform_get_irq(pdev, 1); - if (pie_irq <= 0) + if (pie_irq <= 0) { + retval = -EBUSY; goto err_free_irq; + } retval = request_irq(pie_irq, rtclong1_interrupt, 0, "rtclong1", pdev); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/