From patchwork Thu May 30 08:26:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 247494 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-pb0-x239.google.com (mail-pb0-x239.google.com [IPv6:2607:f8b0:400e:c01::239]) (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 8203B2C02C7 for ; Thu, 30 May 2013 18:40:40 +1000 (EST) Received: by mail-pb0-f57.google.com with SMTP id rp8sf3155802pbb.22 for ; Thu, 30 May 2013 01:40:37 -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: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=Isu/ykfZmNtPzl+wqjTC4S8dxXy990KojXjCJqc1Cuw=; b=fXKr3ZJ/9hc7KA2MyNZViuxeUqrPto47OaoCVZhoNHoQdJUpyNrX87BvLnmvGj4TEH xtEE92Iz4b1Zr0ac+qydk9xyMDYJvtYJXRKVIu9CqFEBaLNyPxocoT8Gfv6ZUKEvYcBV nhmxUpfwu9mpjeNafBlJNdwQOmuaQFeMb0vPTr49PfhXkHXxX/IEKYKdgzphZ/1gCN6/ sH9BkJY9x7d2/1YWr+DZpDjorwdOe0DE+j6JrFSrCqvSyGEZ3fI3C96UA+B2NKsEoCmI 9X2hFxLnohHuzaORkrIoYzdK7x5vlSe6hU+tQmiv0CuWEoHWHCjLXU3Sem1bu20F9i9u oL4g== 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: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=Isu/ykfZmNtPzl+wqjTC4S8dxXy990KojXjCJqc1Cuw=; b=BzOIfd5VfZwfrlqkCyhCTLUt8EbGJiGsd5IxA+H1uSSTMYSBRtBZrsDqsRhGgRtoIy /UhscwsnnvXBXq9bBHa9TVbGq52xDwI55NWEaJPYwksAtkvjVtOZdECisCbqVEFE4wIN aNhFezCv1dD2NZQrzHQ2AD036sp01h12dJGtwB1Y3KMtNihXIBEt/9A+XPXftHJkzIFt PsoEkcGD+v15iyqAnHl7x27eKKxzc7DRvOPhR8whcqaaIkGxV7c0lGUV/0oNwrwzVbLQ YR3gn7SCYqGg3dYasg2hpRPT7RfDu4ziyh7NIKjVsb05mr+ECZ30LAKRA7jyK4HsaXh6 +31w== X-Received: by 10.50.41.104 with SMTP id e8mr2822507igl.5.1369903237059; Thu, 30 May 2013 01:40:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.134.232 with SMTP id pn8ls2189336igb.32.canary; Thu, 30 May 2013 01:40:36 -0700 (PDT) X-Received: by 10.66.217.134 with SMTP id oy6mr1031521pac.36.1369903236423; Thu, 30 May 2013 01:40:36 -0700 (PDT) Received: from mail-pb0-x231.google.com (mail-pb0-x231.google.com [2607:f8b0:400e:c01::231]) by gmr-mx.google.com with ESMTPS id xb6si6167945pab.0.2013.05.30.01.40.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 May 2013 01:40:36 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c01::231 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=2607:f8b0:400e:c01::231; Received: by mail-pb0-f49.google.com with SMTP id rp8so10707784pbb.36 for ; Thu, 30 May 2013 01:40:36 -0700 (PDT) X-Received: by 10.68.138.225 with SMTP id qt1mr6929176pbb.25.1369903236272; Thu, 30 May 2013 01:40:36 -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.33 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 May 2013 01:40:35 -0700 (PDT) From: Sachin Kamat To: rtc-linux@googlegroups.com Cc: a.zummo@towertech.it, akpm@linux-foundation.org, sachin.kamat@linaro.org, David Dajun Chen Subject: [rtc-linux] [PATCH 1/5] drivers/rtc/rtc-da9052.c: Use PTR_RET() Date: Thu, 30 May 2013 13:56:30 +0530 Message-Id: <1369902394-24269-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQnV/pMAXZjWqwXdcT5SHGdUQJfzR7tiS67EwKW1rqdFYzMyyLynpRrrYLa4QKLBTKG8yliY X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 2607:f8b0:400e:c01::231 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: David Dajun Chen --- drivers/rtc/rtc-da9052.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-da9052.c b/drivers/rtc/rtc-da9052.c index 2f7fdd7..9c8c194 100644 --- a/drivers/rtc/rtc-da9052.c +++ b/drivers/rtc/rtc-da9052.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -249,10 +250,7 @@ static int da9052_rtc_probe(struct platform_device *pdev) rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, &da9052_rtc_ops, THIS_MODULE); - if (IS_ERR(rtc->rtc)) - return PTR_ERR(rtc->rtc); - - return 0; + return PTR_RET(rtc->rtc); } static struct platform_driver da9052_rtc_driver = {