From patchwork Tue Jul 22 10:56:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 34063 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f198.google.com (mail-vc0-f198.google.com [209.85.220.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 39AD620540 for ; Tue, 22 Jul 2014 11:04:33 +0000 (UTC) Received: by mail-vc0-f198.google.com with SMTP id hu12sf23995793vcb.9 for ; Tue, 22 Jul 2014 04:04:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=DmyQeEae+oxQR4zRynm1WSEWbY4+nhz4FvuAd9UiUbo=; b=GFAtZcEeMoU1KA/dzTCb6vQzqcJASXnOs6NrM+F5nsV8Dk5bFLhek0J/Qzd+7IGeml thsHAfkbjYAK29DoQTbIZRADM63h6leN/oSNZpLdpkuqVOlExFuyIcAUPvThu1APsRIr n4ob7m0NFueV7UrtT7lX9tjMSe4zkYzlpvA45c4kfkb8IBP/E/ho49Pas/RKSb5vzwae 9hLMeIYnA1dic8LLvvD8weZRWJ1LydiKsf2v9f3JdQbdf3OC8zjAJAPukyGV5L6N4D9N XW1Pc8gcCS5DFAXKdtKC+tF7ckmIXJRDOxWjEgQIQqkmBGc7E5goVkBNavcC2DeQsp8H /kDQ== X-Gm-Message-State: ALoCoQnFGqFGR9ftrbbNJsCfpueKckBspNLqSOtXkoLJYh7irNY6EjcIB1XpW9VxUUa64ZfVPHC+ X-Received: by 10.236.207.164 with SMTP id n24mr15495605yho.5.1406027073768; Tue, 22 Jul 2014 04:04:33 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.47.113 with SMTP id l104ls2327351qga.61.gmail; Tue, 22 Jul 2014 04:04:33 -0700 (PDT) X-Received: by 10.220.5.138 with SMTP id 10mr11477042vcv.67.1406027073561; Tue, 22 Jul 2014 04:04:33 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id v10si70676vdo.17.2014.07.22.04.04.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Jul 2014 04:04:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf12so14471413vcb.29 for ; Tue, 22 Jul 2014 04:04:32 -0700 (PDT) X-Received: by 10.220.15.8 with SMTP id i8mr26568421vca.45.1406027072209; Tue, 22 Jul 2014 04:04:32 -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.221.37.5 with SMTP id tc5csp186119vcb; Tue, 22 Jul 2014 04:04:31 -0700 (PDT) X-Received: by 10.70.134.102 with SMTP id pj6mr2224958pdb.161.1406027071372; Tue, 22 Jul 2014 04:04:31 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gj8si46169pac.127.2014.07.22.04.04.30; Tue, 22 Jul 2014 04:04:30 -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 S1754882AbaGVLE3 (ORCPT + 12 others); Tue, 22 Jul 2014 07:04:29 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:56757 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754154AbaGVK5Q (ORCPT ); Tue, 22 Jul 2014 06:57:16 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s6MAvFgv005515; Tue, 22 Jul 2014 05:57:15 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s6MAvFn6018056; Tue, 22 Jul 2014 05:57:15 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Tue, 22 Jul 2014 05:57:15 -0500 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s6MAv7qh027221; Tue, 22 Jul 2014 05:57:14 -0500 From: Kishon Vijay Abraham I To: CC: , Subject: [PATCH 04/28] phy: sun4i-usb: Use PTR_ERR_OR_ZERO Date: Tue, 22 Jul 2014 16:26:27 +0530 Message-ID: <1406026611-30493-5-git-send-email-kishon@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1406026611-30493-1-git-send-email-kishon@ti.com> References: <1406026611-30493-1-git-send-email-kishon@ti.com> MIME-Version: 1.0 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: kishon@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 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: , From: Sachin Kamat PTR_ERR_OR_ZERO simplifies the code. Signed-off-by: Sachin Kamat Cc: Maxime Ripard Acked-by: Hans de Goede Signed-off-by: Kishon Vijay Abraham I --- 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 115d8d5..7a4ea55 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[] = {