From patchwork Fri Nov 18 14:03:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 9436537 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B31B760237 for ; Fri, 18 Nov 2016 14:04:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C195298D2 for ; Fri, 18 Nov 2016 14:04:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 910B9298DF; Fri, 18 Nov 2016 14:04:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 58B97298D2 for ; Fri, 18 Nov 2016 14:04:12 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c7jly-0008Pi-Qh; Fri, 18 Nov 2016 14:04:10 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c7jlj-0008Dv-OZ; Fri, 18 Nov 2016 14:03:56 +0000 Received: by mail-pf0-x241.google.com with SMTP id i88so13636237pfk.2; Fri, 18 Nov 2016 06:03:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=7ryW0H76VrKaz+oDuAmCB6h7k8NT9qX7oQrVpbGK3lM=; b=VLJMLkqVlnUa6vUkThlg4+7ERjCwRi4AgfMM+2/e8aecxjGBygzc4o7czos620UIV1 s2P/+dFQr5Nw9lZhCqeJt7SwFmyZBcheNAkR92sDD4kBXvyuW0HcDxONC74VbYhS/Iso 836fZC4Qh6euPRLj/nb506hHc11djw7+qRu0keTxpnRKO/tBgof9A4p7Zs47zj7AR0Bd uXpTG9+MYzG6sAyofSZAsDeUecxTRrTkYZtzSQyc0W6SD0TK0U4E3kZsfZOMK5+4PI3h tT5li+wUWtasPEWP5Itt5ozixrs8+Pw9Peh0phDw3Hl4EMZ2PgvfFb3r9txGgtPPYhG6 xq/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=7ryW0H76VrKaz+oDuAmCB6h7k8NT9qX7oQrVpbGK3lM=; b=RVnpn/ss4SGPJcCegZxvJb/f79nY0veKsRXWC0JUU3MCCbih9q778vwRnmhrNTtoz1 FqMS39ntFMYAURMRbAsIUxBCLMiySXWZP8L+HDJjThOMzIQAPrXtUM/aaDQ3emXqz3t2 jopVTh1ej4xYjMtVjVjwXL0+vSq3d0FfaLZTZaBTMJafs9P0HB4gttJRvsl4BchOAb92 tTPgJVJ675Hm1H7QA0PxIOqpaEesgaSJdIehfbxA+P4T1dhk8QBRFf8FLQ4GRTKOCwxh 2aUQwbv+nibJab8fxpkD4QpsP2YviFZSZUQ6JcAlrQ2p9//PLE90P8FqiZ2LFxHyIq+E zRtg== X-Gm-Message-State: ABUngvcRc7OVQM4eN+cVguI/hoXSWqmZTiysH3iDfEwcfC6xtQ/vjSIOV/B4XK81IpKOmA== X-Received: by 10.99.239.5 with SMTP id u5mr19691810pgh.61.1479477814625; Fri, 18 Nov 2016 06:03:34 -0800 (PST) Received: from localhost ([211.100.46.147]) by smtp.gmail.com with ESMTPSA id a1sm371043pgf.16.2016.11.18.06.03.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Nov 2016 06:03:34 -0800 (PST) From: Geliang Tang To: CK Hu , Philipp Zabel , David Airlie , Matthias Brugger Subject: [PATCH] drm: mediatek: use ERR_CAST inlined function Date: Fri, 18 Nov 2016 22:03:29 +0800 Message-Id: <6ead9aa2438aa8ce5ba8b9a1f1c661b9d4e53c26.1479460645.git.geliangtang@gmail.com> X-Mailer: git-send-email 2.9.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161118_060355_940822_E6595181 X-CRM114-Status: UNSURE ( 7.81 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Geliang Tang , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)). Signed-off-by: Geliang Tang --- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_gem.c b/drivers/gpu/drm/mediatek/mtk_drm_gem.c index 7abc550..8d25ff0 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_gem.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_gem.c @@ -245,7 +245,7 @@ struct drm_gem_object *mtk_gem_prime_import_sg_table(struct drm_device *dev, mtk_gem = mtk_drm_gem_init(dev, attach->dmabuf->size); if (IS_ERR(mtk_gem)) - return ERR_PTR(PTR_ERR(mtk_gem)); + return ERR_CAST(mtk_gem); expected = sg_dma_address(sg->sgl); for_each_sg(sg->sgl, s, sg->nents, i) {