From patchwork Tue Mar 26 04:12:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 15642 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 4EC6E23E64 for ; Tue, 26 Mar 2013 04:24:17 +0000 (UTC) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by fiordland.canonical.com (Postfix) with ESMTP id 09FDBA19751 for ; Tue, 26 Mar 2013 04:24:16 +0000 (UTC) Received: by mail-vb0-f50.google.com with SMTP id ft2so4249700vbb.23 for ; Mon, 25 Mar 2013 21:24:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=R6lGDm8L2gcBycHlCBlYh7EPL/wEk3L5QV7EzYn0mN0=; b=Bv3+m0XdW6UQc96gUsolSIVTorGrs9QjiHIMertshSFkH4kq5jgEAUrwgz78KDNWRS pRl/NPZKQBEb9SBqoFiRQgWN6PRYzmqsOAQGBWPr3tComTUfeUVpW2dhj5TLSnECe7R6 mjTaOTKVKAYPBWaJy7f66yGghN3E4X5TMSI/S+ZgPVG1TKA7H5/P3zfdckZRJGuRqElH rLgS9TOnm2Z1G/EQsmKsfWN2BtYEGfgk5+nJsRLTLleHPLg5FwB5e7ARyjFkAXfyaLrb 8UzrdTELEvdPkcxT/ZH77ouAQ8RME1l6wrC0MRBQ0IWdQTP7wLN+5M2XFhwVmOwUXLYD AvZQ== X-Received: by 10.52.31.103 with SMTP id z7mr15833308vdh.56.1364271856529; Mon, 25 Mar 2013 21:24:16 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.59.4.204 with SMTP id cg12csp54437ved; Mon, 25 Mar 2013 21:24:16 -0700 (PDT) X-Received: by 10.66.160.225 with SMTP id xn1mr22184784pab.136.1364271855670; Mon, 25 Mar 2013 21:24:15 -0700 (PDT) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by mx.google.com with ESMTPS id tf2si5081905pac.193.2013.03.25.21.24.15 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Mar 2013 21:24:15 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.43 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.43; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.43 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pa0-f43.google.com with SMTP id hz11so224076pad.30 for ; Mon, 25 Mar 2013 21:24:15 -0700 (PDT) X-Received: by 10.68.197.4 with SMTP id iq4mr21217340pbc.96.1364271855128; Mon, 25 Mar 2013 21:24:15 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id mz8sm15894438pbc.9.2013.03.25.21.24.12 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 25 Mar 2013 21:24:14 -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: [PATCH v2 4/5] drivers/rtc/rtc-max77686.c: Fix incorrect return value on error Date: Tue, 26 Mar 2013 09:42:41 +0530 Message-Id: <1364271162-18141-5-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: ALoCoQnf4y7QB2UdU6qYybY3Z9Qx/it+khZbp+ZZ+I8v7l9u4f6auqI8VRtRp7SSt5vFzx5rds2Q '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;