From patchwork Mon Mar 25 10:45:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 230620 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-pd0-f184.google.com (mail-pd0-f184.google.com [209.85.192.184]) (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 DB5542C008D for ; Mon, 25 Mar 2013 21:57:03 +1100 (EST) Received: by mail-pd0-f184.google.com with SMTP id 4sf1323463pdd.21 for ; Mon, 25 Mar 2013 03:57:01 -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=6Ieuw920qrJBAYQXkKosbMjwkG/gLoLLBDHN6/wWfCE=; b=f+IbwnncvJzVqJ76gUsuHHxdIn3UxezI9NaP3CSAqKc4OKDtod+uHStSZGxwREiFM8 vMUuNM3rNftb6KjltZ9RbqMTY6rkWetSlPGxgfl0loOco3iplmOuY/XXNiEYxlQBfzvu JbXwCqz8zfbcJuYSKdqXPOh85GrITZYRwYVMG67nq3TZmdPKsJ4S5VAPK3HytS4krtL5 sNc2ieX6BaEFTf+XrvwbVirMDiH1lV0rHP/gbfmSX6vSzExj0ANFFWu5hvw1o4r0xCof YFpeqEgcjvK2lRSDMfr4r0nQp/XOkEbUpamL1qUjVoI6TsnDZyGEaaGdWmgOOk/YOSPM TjxQ== 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=6Ieuw920qrJBAYQXkKosbMjwkG/gLoLLBDHN6/wWfCE=; b=DAWj7Oh0exNep0kNf9BM/B6lhLD+qTWb0Zt6ee/AOEJHO5OgzPiRJkgsVLg9ij9jGO 7Kefecf4yhAFE0uPEJma8gE+B7MtbsHqY2xZPNgiqrLdBNeHdDr/aY425VUDS7TdDSjm aF3r1BNE4FmPRcFaYcs/XEel7b+XFuPGiQTxWwjCm5H3mTbx+Pe2hKNfayKmLB+lAYUQ s/I62b1Y0sjZO8AMQLVOHAZMWZDmXUHjAUOz582ExZqHQsnh/h6j5io89IO5f0AjFs3e f8Ck19GTKyBGzkFqejzZqbaG0N4WE2bgPEfpPSbtoYu+OKCLg2BoSdMPhDqI+QRzB+aK u5KQ== X-Received: by 10.50.12.227 with SMTP id b3mr2242965igc.13.1364209021571; Mon, 25 Mar 2013 03:57:01 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.37.133 with SMTP id y5ls3811697igj.42.gmail; Mon, 25 Mar 2013 03:57:01 -0700 (PDT) X-Received: by 10.66.19.134 with SMTP id f6mr1703323pae.46.1364209021366; Mon, 25 Mar 2013 03:57:01 -0700 (PDT) Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) by gmr-mx.google.com with ESMTPS id gl10si2147172pac.2.2013.03.25.03.57.01 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Mar 2013 03:57:01 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.53 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.53; Received: by mail-pb0-f53.google.com with SMTP id un1so4098780pbc.12 for ; Mon, 25 Mar 2013 03:57:01 -0700 (PDT) X-Received: by 10.66.81.2 with SMTP id v2mr17131381pax.204.1364209021277; Mon, 25 Mar 2013 03:57:01 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id y1sm13067861pbg.10.2013.03.25.03.56.58 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 25 Mar 2013 03:57:00 -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, Chiwoong Byun Subject: [rtc-linux] [PATCH 5/6] drivers/rtc/rtc-max77686.c: Fix incorrect return value on error Date: Mon, 25 Mar 2013 16:15:26 +0530 Message-Id: <1364208327-14207-6-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1364208327-14207-1-git-send-email-sachin.kamat@linaro.org> References: <1364208327-14207-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQnc60P7tyVDJbMsLxaJIqPMhcfe05iUaEMATEZMV8G0P2Z1TUe3t5hLzYuOXqwEjbwD8DAq X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.160.53 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 error code before returning. While at it also remove some redundant code and cleanup. Signed-off-by: Sachin Kamat Cc: Chiwoong Byun --- drivers/rtc/rtc-max77686.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c index 5a12b32..fb08b89 100644 --- a/drivers/rtc/rtc-max77686.c +++ b/drivers/rtc/rtc-max77686.c @@ -551,17 +551,17 @@ static int max77686_rtc_probe(struct platform_device *pdev) goto err_rtc; } virq = irq_create_mapping(max77686->irq_domain, MAX77686_RTCIRQ_RTCA1); - if (!virq) + if (!virq) { + ret = -ENXIO; goto err_rtc; + } info->virq = virq; ret = devm_request_threaded_irq(&pdev->dev, virq, NULL, max77686_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_rtc; - } err_rtc: return ret;