From patchwork Thu May 29 05:56:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 31136 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 13C6620068 for ; Thu, 29 May 2014 15:22:51 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id sa20sf2137794veb.5 for ; Thu, 29 May 2014 08:22:50 -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:delivered-to:from:to:subject:date :message-id:cc:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=FHuog4meQu5+gk0q5Bluf388cImLVzLmA/69B5Q/P5g=; b=gzh5mfCjnEwq6jkhB2WgRNhgp9EqEKE6JwUhLgj0KWOY3ayhU5VIQSZFuk7Vtvd68Y xV+2pe/TnxzmEW4S5MT2IvF3GRMEBpy/ITWYBpSC/i6wvuX8yEIdy7efCrj/QtIflSRx XpTIDzTrGUn0cmzj/obnOPEXE6NPgap5aGhLZwoId2fS8QWbFBXye6kw3VkBSHR+cs+u YBELJrBIDD78Tr2jZAjspwIJqZpFptScLVZ6NEbZeE7YnyHMiefSIs57+dcUIZA4vuRc huxiJA/n5sRKZ2uRlEKuoLPVhlxVopj1gmO7AOB3+eu9qk9P5U5l6HyXIJe8VE6oEjz+ 7bTw== X-Gm-Message-State: ALoCoQlrULwDoCVLgsFK45CoSo/EdM2/9ji4/hCns8RRboOMQOjmKeVLD4z6eFakkK6Js5BqpyLl X-Received: by 10.236.165.230 with SMTP id e66mr2957313yhl.6.1401376970425; Thu, 29 May 2014 08:22:50 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.90.48 with SMTP id w45ls568362qgd.73.gmail; Thu, 29 May 2014 08:22:50 -0700 (PDT) X-Received: by 10.58.196.231 with SMTP id ip7mr2572156vec.47.1401376970141; Thu, 29 May 2014 08:22:50 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id v1si715097vdd.63.2014.05.29.08.22.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 May 2014 08:22:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id im17so548843vcb.24 for ; Thu, 29 May 2014 08:22:50 -0700 (PDT) X-Received: by 10.220.7.131 with SMTP id d3mr1961007vcd.45.1401376970068; Thu, 29 May 2014 08:22:50 -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 ib8csp37218vcb; Thu, 29 May 2014 08:22:49 -0700 (PDT) X-Received: by 10.66.144.129 with SMTP id sm1mr9798050pab.40.1401376969245; Thu, 29 May 2014 08:22:49 -0700 (PDT) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id kg4si1312006pad.239.2014.05.29.08.22.48 for ; Thu, 29 May 2014 08:22:49 -0700 (PDT) Received-SPF: none (google.com: dri-devel-bounces@lists.freedesktop.org does not designate permitted sender hosts) client-ip=131.252.210.177; Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1A4C66E9C7; Thu, 29 May 2014 08:22:47 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by gabe.freedesktop.org (Postfix) with ESMTP id D39B36E0AE for ; Wed, 28 May 2014 22:58:47 -0700 (PDT) Received: by mail-pa0-f45.google.com with SMTP id ey11so12268951pad.18 for ; Wed, 28 May 2014 22:58:47 -0700 (PDT) X-Received: by 10.69.26.103 with SMTP id ix7mr5641493pbd.41.1401343127313; Wed, 28 May 2014 22:58:47 -0700 (PDT) Received: from linaro.sisodomain.com ([14.140.216.146]) by mx.google.com with ESMTPSA id ix7sm31436298pbd.36.2014.05.28.22.58.44 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 May 2014 22:58:46 -0700 (PDT) From: Sachin Kamat To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/1] drm/exynos: Use PTR_ERR_OR_ZERO in exynos_dp_core.c Date: Thu, 29 May 2014 11:26:24 +0530 Message-Id: <1401342984-9340-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Mailman-Approved-At: Thu, 29 May 2014 08:22:46 -0700 Cc: sachin.kamat@linaro.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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.220.179 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 PTR_ERR_OR_ZERO simplifies the code. Signed-off-by: Sachin Kamat --- drivers/gpu/drm/exynos/exynos_dp_core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c b/drivers/gpu/drm/exynos/exynos_dp_core.c index ff63901..8b67f41 100644 --- a/drivers/gpu/drm/exynos/exynos_dp_core.c +++ b/drivers/gpu/drm/exynos/exynos_dp_core.c @@ -1168,10 +1168,7 @@ static int exynos_dp_dt_parse_phydata(struct exynos_dp_device *dp) dp_phy_node = of_find_node_by_name(dp_phy_node, "dptx-phy"); if (!dp_phy_node) { dp->phy = devm_phy_get(dp->dev, "dp"); - if (IS_ERR(dp->phy)) - return PTR_ERR(dp->phy); - else - return 0; + return PTR_ERR_OR_ZERO(dp->phy); } if (of_property_read_u32(dp_phy_node, "reg", &phy_base)) {