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: 15588 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 1EBD723E64 for ; Mon, 25 Mar 2013 10:57:04 +0000 (UTC) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com [209.85.215.52]) by fiordland.canonical.com (Postfix) with ESMTP id DF052A192CB for ; Mon, 25 Mar 2013 10:57:03 +0000 (UTC) Received: by mail-la0-f52.google.com with SMTP id fs12so10858186lab.25 for ; Mon, 25 Mar 2013 03:57:03 -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=hpzSSom4UICFXBmw+F1kcU0IeQw19NhkyxTNI0gsE9++w4OCq4JAzzzvYFz50HNrQR lEz8xY2mrJxrxev8M/R+uZEBylJjYH6kkRPwtbSZRw9ycW7zjTzJCTtLL3GSEok7KY0T kzkGoy4/16O/DitF5Ic4+tRcEmkfbVoV7dZCnq+xdJvVxUztfQ1fPiP9t4XOy+PZ811/ XMO7U0T964pcdV0uk96WGaJYjhnSGxgSOl+JQd/gX1pYfxkfKSNuSm2RNvgFAw63SV3t 1qgfvNJIGQtztKczNcBNyMx7fmGrIH5NN/4wgsPfQqmQ990f258LQJJvXr0gDN1vcZBn oJ3Q== X-Received: by 10.112.59.104 with SMTP id y8mr5864569lbq.39.1364209023496; Mon, 25 Mar 2013 03:57:03 -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.112.147.5 with SMTP id tg5csp41245lbb; Mon, 25 Mar 2013 03:57:02 -0700 (PDT) X-Received: by 10.68.195.161 with SMTP id if1mr16530743pbc.207.1364209021955; Mon, 25 Mar 2013 03:57:01 -0700 (PDT) Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by mx.google.com with ESMTPS id lm2si13366141pab.122.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.220.46 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.46; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.46 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-f46.google.com with SMTP id wp1so968810pac.33 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: [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: ALoCoQkBzak+YG9FdawlwT17/zY9dTOVxRHZAAyoJFwjsV7riWt5lTyGfHZGP7eH0LWcwOuVd5eP '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;