From patchwork Thu May 30 08:26:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 247495 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-qe0-f56.google.com (mail-qe0-f56.google.com [209.85.128.56]) (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 F41542C02C7 for ; Thu, 30 May 2013 18:40:42 +1000 (EST) Received: by mail-qe0-f56.google.com with SMTP id 6sf3113445qeb.1 for ; Thu, 30 May 2013 01:40:40 -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=+nfIMr4FUvdTzeE+E1NUk67ie7ILA7ZhqR1prQYE2/o=; b=VPSq4fmt5+O/mxM9pnkqN1UMPs/xGAAi7BoDIkN33g7iKyNfXkc9TUthByx27/3wS9 /3uOClwhTv0D0JSzwSTEcWDtmldTbaQ3XrkcE9ADwVCAdY4ypoOAXxEN6EcGw086bIWV EiC+zdR7jGRQmi4Nba++fqWnCPa3spJI28gkMojukwAkIHPjVQUN3Gnho0wJ3zLGIzd2 y0xcVBylX/VbiCMnAoX9WsDMSynsC/2TxyjVsF47sFxTvSEAc4fcf2ONFWLmzwpOP+m/ p3PZUkf/IUcwcbGDyk3XuxWYjuBh95qwzLwQzdDWd2tjzch8PZdDTRCRwpcJDvE6hfWU bcGQ== 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=+nfIMr4FUvdTzeE+E1NUk67ie7ILA7ZhqR1prQYE2/o=; b=RUDgNvUnEcL/ZrgBGT2PHSXKFcQ54UZQ5KQAYnF4XeZKxaQt9yhk06hQdpQU+62cOL 6GBU2AMb2A1uJulQ/bgv6HEB/lkJ309hytyMN3qbNzTE0NNljoQWa8XqrmCMS0EUrlDc E7HQ+Mpwyj86S7X0Zc8LcGoja+ahUq4PjrsNY4X3rZ5St6aFvh2ynPm2O3a6tnc03y3X tK+OzTYTZhcS/IXC+m4dFr41cUQzmtLkTQHReS5fa7SpxjTehHUpfG5/0kTiYsr+pPsj o9qAjyYezUivMvggVzx98kG2A+kO3auRoW4Lyd1iHqwmz27map+xiUh2nJz2PmZQHtE5 4xKw== X-Received: by 10.50.29.72 with SMTP id i8mr72775igh.1.1369903239902; Thu, 30 May 2013 01:40:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.12.7 with SMTP id u7ls395850igb.25.gmail; Thu, 30 May 2013 01:40:39 -0700 (PDT) X-Received: by 10.66.122.39 with SMTP id lp7mr1028445pab.44.1369903239484; Thu, 30 May 2013 01:40:39 -0700 (PDT) Received: from mail-pb0-x22c.google.com (mail-pb0-x22c.google.com [2607:f8b0:400e:c01::22c]) by gmr-mx.google.com with ESMTPS id sj3si6166084pab.1.2013.05.30.01.40.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 May 2013 01:40:39 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c01::22c is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=2607:f8b0:400e:c01::22c; Received: by mail-pb0-x22c.google.com with SMTP id wz12so10703986pbc.17 for ; Thu, 30 May 2013 01:40:39 -0700 (PDT) X-Received: by 10.68.135.231 with SMTP id pv7mr6753712pbb.108.1369903239400; Thu, 30 May 2013 01:40:39 -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.36 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 May 2013 01:40:38 -0700 (PDT) From: Sachin Kamat To: rtc-linux@googlegroups.com Cc: a.zummo@towertech.it, akpm@linux-foundation.org, sachin.kamat@linaro.org, Roman Fietze Subject: [rtc-linux] [PATCH 2/5] drivers/rtc/rtc-isl12022.c: Use PTR_RET() Date: Thu, 30 May 2013 13:56:31 +0530 Message-Id: <1369902394-24269-2-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: ALoCoQmN9MDAz+egoMt7ng9YZtZLU9yGwDshcAhWq0WJkGqYWm4Yi65n4pnl3KhmOXVzwkSnNfVj X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 2607:f8b0:400e:c01::22c 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: Roman Fietze --- drivers/rtc/rtc-isl12022.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-isl12022.c b/drivers/rtc/rtc-isl12022.c index 6f2de99..5dbdc44 100644 --- a/drivers/rtc/rtc-isl12022.c +++ b/drivers/rtc/rtc-isl12022.c @@ -16,6 +16,7 @@ #include #include #include +#include #define DRV_VERSION "0.1" @@ -267,10 +268,7 @@ static int isl12022_probe(struct i2c_client *client, isl12022->rtc = devm_rtc_device_register(&client->dev, isl12022_driver.driver.name, &isl12022_rtc_ops, THIS_MODULE); - if (IS_ERR(isl12022->rtc)) - return PTR_ERR(isl12022->rtc); - - return 0; + return PTR_RET(isl12022->rtc); } static const struct i2c_device_id isl12022_id[] = {