From patchwork Thu May 29 06:30:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 31084 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id ACCB5203AB for ; Thu, 29 May 2014 06:33:29 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id z6sf52102427yhz.5 for ; Wed, 28 May 2014 23:33:29 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=cMG2dpIYHwhuw/zUIumfc1hYcse6NNeHSxKdnXj8txM=; b=P+WllgxzhNehqZLgIj3n3+EocyqQUDLAeI5OmJhWEyODL2LrhqjtOggJfNTQHC74BP sCpVwyFbPnTTD5LOp4fWieEmEH5zUf2V63ygBWnVF3GP/Xrr/ojFIXcJxz38K7d6jzER T1zDCGDmzzteHX0RsKXghbjUHmpXVPYdbcaPAt/ES9yF+JwwL5sgqonISBkOm7QAZiWB Kaf0B6gRvsVjWb2MtGzuUn7UaKLTz+creEF2zasU8fHRtHl+eLqhlZJGXvP6sktI91Ab 4YHRFlpCjKxwQFV8K8eTKzJNAlj4mFCvedZZOd0/SiZpM0h/ap1WZSOT+YeksVqpBkCg QkXQ== X-Gm-Message-State: ALoCoQl6VXwtjMbYss2MxJ8xHWJ3L1k7VE502h5NsbEjRvALFzro64q5U5fJYTPOubA1VBePAIQA X-Received: by 10.58.30.78 with SMTP id q14mr2276320veh.10.1401345208971; Wed, 28 May 2014 23:33:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.90.48 with SMTP id w45ls379311qgd.73.gmail; Wed, 28 May 2014 23:33:28 -0700 (PDT) X-Received: by 10.52.190.138 with SMTP id gq10mr3718635vdc.47.1401345208785; Wed, 28 May 2014 23:33:28 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id ul5si12563673veb.7.2014.05.28.23.33.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 May 2014 23:33:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id jz11so13705429veb.35 for ; Wed, 28 May 2014 23:33:28 -0700 (PDT) X-Received: by 10.53.13.133 with SMTP id ey5mr4009874vdd.8.1401345208710; Wed, 28 May 2014 23:33:28 -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 ib8csp4103vcb; Wed, 28 May 2014 23:33:28 -0700 (PDT) X-Received: by 10.68.225.133 with SMTP id rk5mr6111598pbc.98.1401345207996; Wed, 28 May 2014 23:33:27 -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.27 for ; Wed, 28 May 2014 23:33:27 -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 S1756954AbaE2GdO (ORCPT + 27 others); Thu, 29 May 2014 02:33:14 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:33274 "EHLO mail-pb0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756938AbaE2GdM (ORCPT ); Thu, 29 May 2014 02:33:12 -0400 Received: by mail-pb0-f44.google.com with SMTP id rq2so12492128pbb.17 for ; Wed, 28 May 2014 23:33:11 -0700 (PDT) X-Received: by 10.66.153.80 with SMTP id ve16mr5830577pab.143.1401345191807; Wed, 28 May 2014 23:33:11 -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.09 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 May 2014 23:33:11 -0700 (PDT) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: kishon@ti.com, sachin.kamat@linaro.org, Jingoo Han Subject: [PATCH 1/3] phy: exynos-dp-video: Use PTR_ERR_OR_ZERO Date: Thu, 29 May 2014 12:00:47 +0530 Message-Id: <1401345049-14779-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 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.176 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: Jingoo Han Acked-by: Jingoo Han --- drivers/phy/phy-exynos-dp-video.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/phy/phy-exynos-dp-video.c b/drivers/phy/phy-exynos-dp-video.c index 0786fef842e7..098f822a2fa4 100644 --- a/drivers/phy/phy-exynos-dp-video.c +++ b/drivers/phy/phy-exynos-dp-video.c @@ -9,6 +9,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include @@ -84,10 +85,8 @@ static int exynos_dp_video_phy_probe(struct platform_device *pdev) phy_set_drvdata(phy, state); phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_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 exynos_dp_video_phy_of_match[] = {