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: 231076 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-vc0-f187.google.com (mail-vc0-f187.google.com [209.85.220.187]) (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 4FBA32C009D for ; Tue, 26 Mar 2013 15:24:18 +1100 (EST) Received: by mail-vc0-f187.google.com with SMTP id kw10sf2421036vcb.24 for ; Mon, 25 Mar 2013 21:24:15 -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=J/TslO96P1LjQ2O84O+gLQpUtUfK0x92E6E6b1Kdep+5D5PMSU60wz3Ig55SccgnRW x+doU1q4Uyfp1MLckk/DeFC1eDtXoPBdtlYenae8Opdf9RLgzHS+qccj+D8soIrvNyUC FfBJBdUtg7uMpwGWaVamE4Bx8JniFAyeLvgxp9AYB8aU/UYH3Px+/LOezDpOWaN7XX7K TDUWDdQ6x/FYayXlSR/jEPQ5bboPyLu18seZi12qWxiCaXjLiTzothUz55eH5GxCs1dT eMtqoVFbqK4kgofawEhyiDZPs7trhbdweHIk3ckXsJTgFfRzwgiwOXN+zpGv73ipW9j3 BLFw== 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=brRypbrZk2YyekvaAWrgmRiUOZBffGDaokWLmp6tcjemk9YtVrEobhHw6JFYaF8vUB fwiEpL2VyabDJK/lZhfQ5UHVXUs3nwPORDOMUrpS/x9asG3R0grjPEB1x874ZUpqkypH 5qyJ0TCzYzyU9pdM1I55hVrX7COiJanLg/3oT7EzWJIMImrZVgsSGZyAwoTTjP6DE1qB qHHE0JGMvWZZJCi8vBwOvG2PSdpYL0fPPGdoV9MpgXt8hTb2q/+ZuUaQ6jxpuoc6q/MD lW+KkpwQ3eWvHc8AbOFljzlF+PJ3hK7ssc0sY2PbZjuuqhMTIzcFSd/IUWC00i5yxXBJ t8Yw== X-Received: by 10.50.150.166 with SMTP id uj6mr34423igb.1.1364271855426; Mon, 25 Mar 2013 21:24:15 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.88.129 with SMTP id bg1ls4260912igb.13.gmail; Mon, 25 Mar 2013 21:24:15 -0700 (PDT) X-Received: by 10.66.227.72 with SMTP id ry8mr742405pac.30.1364271855209; Mon, 25 Mar 2013 21:24:15 -0700 (PDT) Received: from mail-pb0-f42.google.com (mail-pb0-f42.google.com [209.85.160.42]) by gmr-mx.google.com with ESMTPS id ty9si2537930pbc.0.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.160.42 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.42; Received: by mail-pb0-f42.google.com with SMTP id xb4so4519614pbc.15 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: [rtc-linux] [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: ALoCoQkOosIWCvaEiMogsEva498t7vJQ9XBr5UBNWvPselse7zpV6SMcmdS22HyeLEsi95x4MbPm X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.160.42 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;