From patchwork Mon May 13 06:26:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 243289 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-bk0-x23a.google.com (mail-bk0-x23a.google.com [IPv6:2a00:1450:4008:c01::23a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id DEA3B2C008F for ; Mon, 13 May 2013 16:26:05 +1000 (EST) Received: by mail-bk0-f58.google.com with SMTP id mz1sf12010bkb.3 for ; Sun, 12 May 2013 23:26:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=x-received:x-beenthere:x-received:received-spf:mime-version :x-received:date:message-id:subject:from:to:cc:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=BnhtUeSKYTdzQJqEtuOQWJV/hZtzam6INyWRiHxHAw8=; b=Siwqgw+W0wJ8wlMTVw+XBz6nsIkzY2+Ai1y4lvlHYx2YC8AT47wptiidFMc63xMY7H culWd6x9bDUOKSfRlaSdvutWdLvrxJ9geXtrSWiPPCrCV9xUWKAE69C8KmrrzBtnpA/Y dOYZiaRQwlocEt3pycaXjixdsqqv+/unZxpqu5yIir746P0N97bLTrdjdMb3VdrML+Zs N15e9GF827jHc2AEEhli1OC58OqQWw2amxIps7w/3umpqY2TGFnci2s3OkcaVXxxu2Gc qqva3iGzSbJMhwcyJvZ19aIoilPJ6erGCTcwyIIcW09YnZCmmPHQmDuirU6GcwgmyzU2 ZJFA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:x-beenthere:x-received:received-spf:mime-version :x-received:date:message-id:subject:from:to:cc:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=BnhtUeSKYTdzQJqEtuOQWJV/hZtzam6INyWRiHxHAw8=; b=nrFpFRWyC/PSeUbZflAanvyul3PoNDkWqrNdr0LIWMKzk5YwrFNflS/86GZXh2+ddg 0ToY+pJmc7Y7jhZ2WD8lqruJxBNcQEYLPqsIoR7dHyxih76gHYOfFGgvvAWq7lh7Nll+ m1l6GW8XkwT9nXnLU3moijl5E3jelufEjxPL1Eq7+BLJpLV6y9imJTm//2YmpxGn0Gfi U5bmGfPLARbbPLpS41reYYDbIyve7gzQbElFzxXGHoyguf6wAKLDdMa4xdnTGBoO5EAn ylNvbVDrVkNEX+p6woVZN8dddEdapQMjlp2llE1naL0f7lGK9y9PfZXjnIi1SzJk34c8 gTuA== X-Received: by 10.180.189.6 with SMTP id ge6mr764913wic.6.1368426361303; Sun, 12 May 2013 23:26:01 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.180.97.167 with SMTP id eb7ls679718wib.7.gmail; Sun, 12 May 2013 23:26:00 -0700 (PDT) X-Received: by 10.204.70.76 with SMTP id c12mr4064067bkj.5.1368426360602; Sun, 12 May 2013 23:26:00 -0700 (PDT) Received: from mail-bk0-x22b.google.com (mail-bk0-x22b.google.com [2a00:1450:4008:c01::22b]) by gmr-mx.google.com with ESMTPS id jh7si878403bkb.3.2013.05.12.23.26.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 12 May 2013 23:26:00 -0700 (PDT) Received-SPF: pass (google.com: domain of weiyj.lk@gmail.com designates 2a00:1450:4008:c01::22b as permitted sender) client-ip=2a00:1450:4008:c01::22b; Received: by mail-bk0-x22b.google.com with SMTP id jm19so2273569bkc.30 for ; Sun, 12 May 2013 23:26:00 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.204.57.13 with SMTP id a13mr5232543bkh.63.1368426360440; Sun, 12 May 2013 23:26:00 -0700 (PDT) Received: by 10.204.199.129 with HTTP; Sun, 12 May 2013 23:26:00 -0700 (PDT) Date: Mon, 13 May 2013 14:26:00 +0800 Message-ID: Subject: [rtc-linux] [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 X-Original-Sender: weiyj.lk@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of weiyj.lk@gmail.com designates 2a00:1450:4008:c01::22b as permitted sender) smtp.mail=weiyj.lk@gmail.com; dkim=pass header.i=@gmail.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , 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);