From patchwork Thu May 29 06:30:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 31086 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 510EA203AB for ; Thu, 29 May 2014 06:33:31 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id va2sf58964285obc.5 for ; Wed, 28 May 2014 23:33:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=+1mmJGv+7nfNcprSXToFkIg6yh0DE1XSh8EVfEIFuqc=; b=JxFy39zWHe8Afa3OVTqoXiqadAi7A97UKpODOOWP2mPS9aGyj4vOaauZa1l1+kFH4H X+w47sgvDis7B/oEnZWABqoQsBjduQJiLxSr0UyFqzfuna73RmL8PlEbKSNK3Nx/TEaL +UYXK+5RW6seqzS8t9BQjA+QoGUYdTGpp7MxS4lWsM2mtbm4ikjDWvw9jz1eNDsNbEm6 CUfaX53RHZ+IKhy0ncqBb5fDqfcuJVbBepTz1NQTKR+/lim/yWlZlBRXnUICDdr9nbWu fHiq95mDXvYkAZiZiB7UV9uHsSO87q0u33QNJwTn5NZsaJaomSSb6dEGsuzwj/gqNPWG antQ== X-Gm-Message-State: ALoCoQl0AOV4WoykXq9ZWS0N4i9RDKbGrZDd7JRWZjSidL3w3O9Pu8IFk1qf90QbwbVbsCOA3N7p X-Received: by 10.182.20.195 with SMTP id p3mr2234387obe.26.1401345210704; Wed, 28 May 2014 23:33:30 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.107.97 with SMTP id g88ls431021qgf.40.gmail; Wed, 28 May 2014 23:33:30 -0700 (PDT) X-Received: by 10.52.12.129 with SMTP id y1mr88811vdb.59.1401345210551; Wed, 28 May 2014 23:33:30 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id gf4si12549560veb.67.2014.05.28.23.33.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 May 2014 23:33:30 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.177 as permitted sender) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id db11so13666237veb.36 for ; Wed, 28 May 2014 23:33:30 -0700 (PDT) X-Received: by 10.52.104.7 with SMTP id ga7mr3804566vdb.29.1401345210471; Wed, 28 May 2014 23:33:30 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp4106vcb; Wed, 28 May 2014 23:33:30 -0700 (PDT) X-Received: by 10.68.139.36 with SMTP id qv4mr6177609pbb.82.1401345209747; Wed, 28 May 2014 23:33:29 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hv12si15212060pac.103.2014.05.28.23.33.28 for ; Wed, 28 May 2014 23:33:28 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756997AbaE2GdU (ORCPT + 27 others); Thu, 29 May 2014 02:33:20 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:39668 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756973AbaE2GdR (ORCPT ); Thu, 29 May 2014 02:33:17 -0400 Received: by mail-pa0-f52.google.com with SMTP id fa1so12271765pad.25 for ; Wed, 28 May 2014 23:33:17 -0700 (PDT) X-Received: by 10.66.176.196 with SMTP id ck4mr6141630pac.154.1401345197249; Wed, 28 May 2014 23:33:17 -0700 (PDT) Received: from linaro.sisodomain.com ([14.140.216.146]) by mx.google.com with ESMTPSA id ba5sm31591799pbc.61.2014.05.28.23.33.14 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 May 2014 23:33:16 -0700 (PDT) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: kishon@ti.com, sachin.kamat@linaro.org, Hans de Goede , Maxime Ripard Subject: [PATCH 3/3] phy: sun4i-usb: Use PTR_ERR_OR_ZERO Date: Thu, 29 May 2014 12:00:49 +0530 Message-Id: <1401345049-14779-3-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1401345049-14779-1-git-send-email-sachin.kamat@linaro.org> References: <1401345049-14779-1-git-send-email-sachin.kamat@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , PTR_ERR_OR_ZERO simplifies the code. Signed-off-by: Sachin Kamat Cc: Hans de Goede Cc: Maxime Ripard Acked-by: Hans de Goede --- drivers/phy/phy-sun4i-usb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c index 115d8d5190d5..7a4ea552f621 100644 --- a/drivers/phy/phy-sun4i-usb.c +++ b/drivers/phy/phy-sun4i-usb.c @@ -22,6 +22,7 @@ */ #include +#include #include #include #include @@ -306,10 +307,8 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev) dev_set_drvdata(dev, data); phy_provider = devm_of_phy_provider_register(dev, sun4i_usb_phy_xlate); - if (IS_ERR(phy_provider)) - return PTR_ERR(phy_provider); - return 0; + return PTR_ERR_OR_ZERO(phy_provider); } static const struct of_device_id sun4i_usb_phy_of_match[] = {