From patchwork Tue Mar 26 04:12:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 231074 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ye0-f189.google.com (mail-ye0-f189.google.com [209.85.213.189]) (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 752152C009D for ; Tue, 26 Mar 2013 15:24:12 +1100 (EST) Received: by mail-ye0-f189.google.com with SMTP id l8sf333068yen.16 for ; Mon, 25 Mar 2013 21:24:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references: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=cXnrqWgNfYhoyDJeyk2DBqBfazKt8ADUtA8505zrNFQ=; b=UUFBihx3FvzuyI3/n9BEp5MVyXMXz2hcUbbHbxQ3ZRsfSzOU6XrIPIV9F+fnQfqOp0 vOiRdiYIdUTV+LV7Jz4hN9rwMSBA01l6uInLdEKMPPA/HaXAEUZ/Z6xJPlkwgEWtkoPh J8kqYppN1D1k81fQ5cii+0W+UKafqVOrZqpndrQqV+3Tq4+6+awWgBbDT1aw5Oj7wQQ2 UPaTnZVezQDYc+cJfY/Afk13do5mCt9oA1Ze/19ngp6C+UAYfazUvCu2/yk8REbDKeIG uxcwV7SkvgpZQjgNptCVaDaWuWOaMQi6hpNKr33toZZqCbL92bgc51zKPTGk+0qbiunZ 6qaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state: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=cXnrqWgNfYhoyDJeyk2DBqBfazKt8ADUtA8505zrNFQ=; b=RxfwBV/Eas+OUZNV6WTWx/UOthFz22XtImJA6cqFSCHRMycqGnxKwrGv9Pj/r+UZ/d KJwssM29mu5jIWzf6Rmy9BTVxTGXhnR5a6W1w3zOed1MVw5ZqPJdOyJ+x+lX2HlgrG/W O5x2wJh3k4V0gaNGuYNWBZGGQPKrocreogE4uZa0DN6VG52M8tImH+89V7ATCU8dd+ab sRWx3FJr4pNc1s8W08sjg94MtzgEECrtuRqK4V0mLuQivz3sLZuTdOyXPUJN/r1Kql1S YspcRIiAgLJssTwFYnDfIV0Jltx72963P4BzvZOpuSj5TxAd5zWsN0iiMOo7ot3tSPFd f0VQ== X-Received: by 10.50.188.231 with SMTP id gd7mr46738igc.9.1364271849470; Mon, 25 Mar 2013 21:24:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.182.136 with SMTP id ee8ls116221igc.2.canary; Mon, 25 Mar 2013 21:24:09 -0700 (PDT) X-Received: by 10.68.136.104 with SMTP id pz8mr2069178pbb.3.1364271849234; Mon, 25 Mar 2013 21:24:09 -0700 (PDT) Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by gmr-mx.google.com with ESMTPS id gl10si2626995pac.2.2013.03.25.21.24.09 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Mar 2013 21:24:09 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.47 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.47; Received: by mail-pa0-f47.google.com with SMTP id bj3so936220pad.20 for ; Mon, 25 Mar 2013 21:24:09 -0700 (PDT) X-Received: by 10.68.243.98 with SMTP id wx2mr21477863pbc.68.1364271849121; Mon, 25 Mar 2013 21:24:09 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id mz8sm15894438pbc.9.2013.03.25.21.24.06 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 25 Mar 2013 21:24:08 -0700 (PDT) From: Sachin Kamat To: rtc-linux@googlegroups.com Cc: a.zummo@towertech.it, akpm@linux-foundation.org, sachin.kamat@linaro.org, patches@linaro.org Subject: [rtc-linux] [PATCH v2 2/5] drivers/rtc/rtc-tps65910.c: Fix incorrect return value on error Date: Tue, 26 Mar 2013 09:42:39 +0530 Message-Id: <1364271162-18141-3-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1364271162-18141-1-git-send-email-sachin.kamat@linaro.org> References: <1364271162-18141-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQmgN4uqS+pPpR61PE6eVSFSSIEzUcaUxg4PiFaCgmIfFhyk2NJo0rgxuMiTdB1+6I4qv9cK X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.220.47 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org 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: , 'ret' was not initialized to correct error value before returning. Since 'irq' is also being tested for 0, we cannot return irq itself as it means function is success even though we are returning before completing the probe. Signed-off-by: Sachin Kamat Acked-by: Venu Byravarasu --- drivers/rtc/rtc-tps65910.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c index 26b8bd2..a9caf04 100644 --- a/drivers/rtc/rtc-tps65910.c +++ b/drivers/rtc/rtc-tps65910.c @@ -263,7 +263,7 @@ static int tps65910_rtc_probe(struct platform_device *pdev) if (irq <= 0) { dev_warn(&pdev->dev, "Wake up is not possible as irq = %d\n", irq); - return ret; + return -ENXIO; } ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,