From patchwork Thu May 30 08:26:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 247496 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-gg0-x23e.google.com (mail-gg0-x23e.google.com [IPv6:2607:f8b0:4002:c02::23e]) (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 285562C02C7 for ; Thu, 30 May 2013 18:40:45 +1000 (EST) Received: by mail-gg0-f190.google.com with SMTP id k25sf3125068ggl.7 for ; Thu, 30 May 2013 01:40:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:x-beenthere: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=eC02ycHjXoOZuJ5kyYlhw54+HtNE8BBW+9L+Qhw0JWc=; b=sQK04UfNrmPQoEcqdjAu3dqaWbvmis9rQL+nQigx0e5PYvqPs/BtRnxi+naRHGB8XB dRIetnIEqmR3f4Fsr1Q2w+7NVu3TM22xeFRMSu7XOB6prSFq5ageobvo/uCme/TTg3CO eE1vS06JKCSugvyDswTrH/Kgj9xGDHATzwbBmVQXxgC3eaM+RrYjNT0in4zSY3EHZDHu 9X/EqnyxJnYccbWoS0b+6zqJNASZip1RSmFhG97y9P1s0+8m1ERHFn6XJ/mYgWcY0Zhh PLTVVRaI0xvv8LESo+6UH446Lti5TsEQhh3L4C+cmFhq5bTDKa/lrYMds4pAQGJpebrT GRzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere: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=eC02ycHjXoOZuJ5kyYlhw54+HtNE8BBW+9L+Qhw0JWc=; b=Bm6+jTQZZaV2Y2kTfEwbh+A8529ASlYNqG65tb+pnWXZCZeiHKVGrKM5b+yAfE2gvi ta3marrnRhM6Ybl/i29eXmLJiVyiwxBIvmatoMnNgf2yc9t1pmywbGDw1kR/zdOblmRK /aNAmYeLgg3nW8doJL+QySRWZnjcZgcq7BNznLpJU641mII6YvSOlw/OJhmZaLuCStcj ZcKzYMKkwt1PgfN3cWEu9sHf5RMC+Eqln+BcfJjr0fpJpS1IxfDCMg4w1Q+Py8vAv3XQ sPdbt1NuYK3rePlBCRnNejB7ghvopd+fX+ATYO2y8veC2wCXSoWDqVw4WW7ok9FS5PGK KpXA== X-Received: by 10.50.65.2 with SMTP id t2mr2815584igs.9.1369903243024; Thu, 30 May 2013 01:40:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.11.82 with SMTP id o18ls4059486igb.14.canary; Thu, 30 May 2013 01:40:42 -0700 (PDT) X-Received: by 10.66.122.200 with SMTP id lu8mr969581pab.4.1369903242645; Thu, 30 May 2013 01:40:42 -0700 (PDT) Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176]) by gmr-mx.google.com with ESMTPS id sj3si6165346pab.1.2013.05.30.01.40.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 May 2013 01:40:42 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.176 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.192.176; Received: by mail-pd0-f176.google.com with SMTP id r11so10212312pdi.7 for ; Thu, 30 May 2013 01:40:42 -0700 (PDT) X-Received: by 10.68.171.196 with SMTP id aw4mr6761441pbc.78.1369903242542; Thu, 30 May 2013 01:40:42 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id vb8sm41026832pbc.11.2013.05.30.01.40.39 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 May 2013 01:40:41 -0700 (PDT) From: Sachin Kamat To: rtc-linux@googlegroups.com Cc: a.zummo@towertech.it, akpm@linux-foundation.org, sachin.kamat@linaro.org, Thomas Bogendoerfer Subject: [rtc-linux] [PATCH 3/5] drivers/rtc/rtc-m48t35.c: Use PTR_RET() Date: Thu, 30 May 2013 13:56:32 +0530 Message-Id: <1369902394-24269-3-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1369902394-24269-1-git-send-email-sachin.kamat@linaro.org> References: <1369902394-24269-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQmmYL/ImaR4UB2joQ5DioBubxDQf9/XNmzqu/mZj5RKRgdhDOrk5PQBdrxhOJPvJbER8tEG X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.192.176 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: , Use of PTR_RET() simplifies the code. Signed-off-by: Sachin Kamat Cc: Thomas Bogendoerfer --- drivers/rtc/rtc-m48t35.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-m48t35.c b/drivers/rtc/rtc-m48t35.c index 25678d4..23c3779 100644 --- a/drivers/rtc/rtc-m48t35.c +++ b/drivers/rtc/rtc-m48t35.c @@ -20,6 +20,7 @@ #include #include #include +#include #define DRV_VERSION "1.0" @@ -174,10 +175,7 @@ static int m48t35_probe(struct platform_device *pdev) priv->rtc = devm_rtc_device_register(&pdev->dev, "m48t35", &m48t35_ops, THIS_MODULE); - if (IS_ERR(priv->rtc)) - return PTR_ERR(priv->rtc); - - return 0; + return PTR_RET(priv->rtc); } static struct platform_driver m48t35_platform_driver = {