From patchwork Tue Mar 26 04:12:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 231075 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ob0-x239.google.com (mail-ob0-x239.google.com [IPv6:2607:f8b0:4003:c01::239]) (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 449A72C009D for ; Tue, 26 Mar 2013 15:24:15 +1100 (EST) Received: by mail-ob0-f185.google.com with SMTP id wo10sf1168973obc.22 for ; Mon, 25 Mar 2013 21:24:12 -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=3qAws7ufZL6/lee2LJsmW/r4NEbOYqaXnr+WUESCXqQ=; b=usGh8HtDcdUPnLw2UuFAQXvIlGQ8ylVm1RXqOYlKKFblaqFrx+LQE1aOdjzb4iZWPN Ei2Eqnb17kyEghgzmji/IHpqbDHxtVLsdWeglkbz3brHpCHrvOmvqmvpnriRxAqWObqa UpBBkgZ4KUVwTxopIUxtZ9t4zDYTNrOUoKdv9Zu8Qi28ccG7IN/v6cgTYS588GIJpIZK PaBaid7r9eWSWTUlQinEe2r4WAmOjNudC5BD/MLuiiGco5RsuTnCDZV24wxropgHv/K3 tmRLBWrClwZmzSwcA1ZtYYU69AUQPDSkywamdkV8dJQvHh4ZlFNmYTDGP+JlSLpOYgD4 7+GA== 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=3qAws7ufZL6/lee2LJsmW/r4NEbOYqaXnr+WUESCXqQ=; b=g+pd18RwiioaZuR5UUk1ZZgEAxZ5FivRuwuyImefAsmohv1kkgiShDjQ2c7eK3KQHw X/GBYXk/d/O0Rvdd5jDbxWmZvP4d8xRfVxvcYeZ64JVuFAQsdhzS29vE/7yvRpw/5hyt bxXvCpdk58uwgv79vIWItE6h2oBBA2EUH1lFQdkchgQvYGU2krffFibWuLvk7iMHCiOa Ksc65IQVE8/EwXJ1Hy6kkGTCQ6ObZd/QHxSsvSfQ29sX3tYILIKFJlJGM2uguznwm+C2 YOLQm9+If652XnJ3nWPBsGNpJE4s294S2hY0VzMWi4UrwPwXQ4KoefHupSZD81W49BHm x42w== X-Received: by 10.50.161.225 with SMTP id xv1mr46502igb.15.1364271852461; Mon, 25 Mar 2013 21:24:12 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.95.198 with SMTP id dm6ls99357igb.16.canary; Mon, 25 Mar 2013 21:24:12 -0700 (PDT) X-Received: by 10.66.16.135 with SMTP id g7mr1870470pad.33.1364271852270; Mon, 25 Mar 2013 21:24:12 -0700 (PDT) Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) by gmr-mx.google.com with ESMTPS id ty9si2537971pbc.0.2013.03.25.21.24.12 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Mar 2013 21:24:12 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.51 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.51; Received: by mail-pb0-f51.google.com with SMTP id rr4so1830395pbb.24 for ; Mon, 25 Mar 2013 21:24:12 -0700 (PDT) X-Received: by 10.66.172.77 with SMTP id ba13mr21726769pac.63.1364271852137; Mon, 25 Mar 2013 21:24:12 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id mz8sm15894438pbc.9.2013.03.25.21.24.09 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 25 Mar 2013 21:24:11 -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, Jonghwa Lee Subject: [rtc-linux] [PATCH v2 3/5] drivers/rtc/rtc-max8997.c: Fix incorrect return value on error Date: Tue, 26 Mar 2013 09:42:40 +0530 Message-Id: <1364271162-18141-4-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: ALoCoQl7aC/UyMNCBawJK1wLvhyMvuTMjOjhamyscVgAJyEIW7eWQQss0Lv64LuUs4vF3mXr0yJV X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.160.51 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 being returned without initializing it to error code. While at it also remove duplicate return statement. Signed-off-by: Sachin Kamat Cc: Jonghwa Lee --- drivers/rtc/rtc-max8997.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/rtc/rtc-max8997.c b/drivers/rtc/rtc-max8997.c index d12acc4..5693619 100644 --- a/drivers/rtc/rtc-max8997.c +++ b/drivers/rtc/rtc-max8997.c @@ -491,6 +491,7 @@ static int max8997_rtc_probe(struct platform_device *pdev) virq = irq_create_mapping(max8997->irq_domain, MAX8997_PMICIRQ_RTCA1); if (!virq) { dev_err(&pdev->dev, "Failed to create mapping alarm IRQ\n"); + ret = -ENXIO; goto err_out; } info->virq = virq; @@ -498,13 +499,9 @@ static int max8997_rtc_probe(struct platform_device *pdev) ret = devm_request_threaded_irq(&pdev->dev, virq, NULL, max8997_rtc_alarm_irq, 0, "rtc-alarm0", info); - if (ret < 0) { + if (ret < 0) dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n", info->virq, ret); - goto err_out; - } - - return ret; err_out: return ret;