From patchwork Thu May 30 08:26:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 247498 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ve0-x23f.google.com (mail-ve0-x23f.google.com [IPv6:2607:f8b0:400c:c01::23f]) (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 656F82C02C7 for ; Thu, 30 May 2013 18:40:53 +1000 (EST) Received: by mail-ve0-f191.google.com with SMTP id da11sf1173984veb.18 for ; Thu, 30 May 2013 01:40:50 -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=lMippI+scUmIVB8c1qN8Fvaq8brdQ0gX0GvPYCo1nSM=; b=skhxcK3ccJpJEsmEZmp/SnORoWKdPu0ONNr/zpKkwbAuzIgCFz2ZAYuakmRc4hkGz7 4QyhJWmuGQ0O4plAlZiDqYUTH0TN4m0Fi7gqy5OulCHus2wgx4W2WbwvZ4XBPcXmI66E KXrSfdRHCqz8F9K3uDOwZmagwh3dqRLf85Lu+FLq/tIKPi/MeoOhEDu41SYdfRsFi+0P swz1lduNyIxlXsfXMC+yKjrQtS25SEiK7gaimoonP81xzeq7RDDQFS9ZdhxOej8GX6Ma xZCc4+3VfrJEec0QHoX9OrkxVV0jPj44//7dwufGoOhKV9qTd2oVUx8qwYXSX3k+0FLn NsDw== 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=lMippI+scUmIVB8c1qN8Fvaq8brdQ0gX0GvPYCo1nSM=; b=AM7NOoSFH0k51zBYEGTDykt1CDwX06PGWFPWpj4RMaSA9fRLtskWcQkWYTjmENOGjG +/3qzwutJ41EqiGujBhQ4DRIzTAEJGgbOGUtm41lAaTHg14QXNiVoTn7dWoRD7egwUqZ BmuuV0rcwKc/kp0O7CnoLyi2UvUk2wFMPcROPq+jXSv+VaxRWGV4ja493UhmTdc1y+DY OL5qaWe1/hm2+lDvxFVBrGAOE5dwi36gU+HVq0/WuzJ++OcRa2eQvuGgvk2hU3ohvnGB fNmoSl11typBxO1P3VOLvDWu9WsisLzHeHILYmu3RIArWgXLw0EZaqxQDGY8aJ8TIY2B PMyw== X-Received: by 10.50.164.200 with SMTP id ys8mr2008213igb.14.1369903250554; Thu, 30 May 2013 01:40:50 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.149.138 with SMTP id ua10ls4116400igb.41.canary; Thu, 30 May 2013 01:40:50 -0700 (PDT) X-Received: by 10.66.144.98 with SMTP id sl2mr1038081pab.12.1369903250208; Thu, 30 May 2013 01:40:50 -0700 (PDT) Received: from mail-pd0-f180.google.com (mail-pd0-f180.google.com [209.85.192.180]) by gmr-mx.google.com with ESMTPS id xb6si6167495pab.0.2013.05.30.01.40.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 May 2013 01:40:50 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.180 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.192.180; Received: by mail-pd0-f180.google.com with SMTP id 14so7815121pdc.25 for ; Thu, 30 May 2013 01:40:50 -0700 (PDT) X-Received: by 10.66.25.244 with SMTP id f20mr7205663pag.211.1369903250118; Thu, 30 May 2013 01:40:50 -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.46 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 May 2013 01:40:49 -0700 (PDT) From: Sachin Kamat To: rtc-linux@googlegroups.com Cc: a.zummo@towertech.it, akpm@linux-foundation.org, sachin.kamat@linaro.org Subject: [rtc-linux] [PATCH 5/5] drivers/rtc/rtc-pcf8583.c: Use PTR_RET() Date: Thu, 30 May 2013 13:56:34 +0530 Message-Id: <1369902394-24269-5-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: ALoCoQnaVXbtBSDmEUY8s8SL5hicLbhgzp4sJi2N8rFBUaii3LPYxT548cADcACy5QmmnrAKVYx7 X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.192.180 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 --- drivers/rtc/rtc-pcf8583.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-pcf8583.c b/drivers/rtc/rtc-pcf8583.c index ab740cd..843a745 100644 --- a/drivers/rtc/rtc-pcf8583.c +++ b/drivers/rtc/rtc-pcf8583.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -284,10 +285,7 @@ static int pcf8583_probe(struct i2c_client *client, pcf8583_driver.driver.name, &pcf8583_rtc_ops, THIS_MODULE); - if (IS_ERR(pcf8583->rtc)) - return PTR_ERR(pcf8583->rtc); - - return 0; + return PTR_RET(pcf8583->rtc); } static const struct i2c_device_id pcf8583_id[] = {