From patchwork Sun Apr 16 04:08:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9683403 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 5FAD2600C5 for ; Mon, 17 Apr 2017 00:32:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 513462793A for ; Mon, 17 Apr 2017 00:32:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 45CB327D4A; Mon, 17 Apr 2017 00:32:35 +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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9DA972793A for ; Mon, 17 Apr 2017 00:32:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 84C0F6E119; Mon, 17 Apr 2017 00:32:21 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 71CDB6E0A9 for ; Sun, 16 Apr 2017 04:12:28 +0000 (UTC) Received: by mail-pf0-x241.google.com with SMTP id i5so20006570pfc.3 for ; Sat, 15 Apr 2017 21:12:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NGv8mSsRZ4Eyb6ligXri9ieGtbqdYQL2lmrr2UX+bUI=; b=d57d8G3Z/URYZVcQBwwSjaljtx2yhqYo6Ci9TmLj8IlmAJSCayj+r4R96DV/E4V/KX NIRMZeFyoF90r7izHrDiujoKz21aFZ6Evkjo1CwpVk44r19uzhknf+rHcMXrnwTZgxY1 JPEAOX1N0Upp8nrHrNXqzgVQUVITJNLH+9VVc+PTOT1hTonvay+dO7Y2RLW61XMfVSpV Wqg7QkMWWh4iBFf0EPKYg29d1zeVG3suReLmTgL+cg55kIzCwz79D90g/tz+H6c5U0fG pE05/X9MPd+FryXdmWKiK2AeP2q4WUVJgCDPeHqB8hHthNOMHbQwW8DMOvvSk8ylk4Ae ElhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NGv8mSsRZ4Eyb6ligXri9ieGtbqdYQL2lmrr2UX+bUI=; b=BPNC13tjEFVPhx7x3kKK+yoZ3OdMlfuON8brOTv/fCbfZgoTrqPPI2rCpGMB/2M66B E1WuN2ryeAwk3L7Sy8x0Q8m+6WuSRiI4on9s6mdS+TjxYkLBdDsufzF9WYA8BoUfxabI 3K8A7XoQ3RfQtToiZ9Lv5lAaqKFnWzD+1SZQLQesHnXr5rYJWGe8H6uXC96ZOjiwnos9 wtbpkTf/A0TN+dPfKj2Kf3xzQftf2syqAxf402Hhwmnzb9k83UFQdmxD+bC2+J96nGZJ OcpVj65c9CEpggxNlFbmkHq1IpmOUjZh5EbqkJ21A/1oeJgr6CyYAF7pJF4qi2ljwTTk rlNA== X-Gm-Message-State: AN3rC/5f3/mogtVi7ivXa2wgJlJ/7PEu2WmuGcrgL9VtGOYNpLgDVoEW Ugf3SH7mnzFnDg== X-Received: by 10.84.150.129 with SMTP id h1mr7319841plh.75.1492315948188; Sat, 15 Apr 2017 21:12:28 -0700 (PDT) Received: from localhost.localdomain.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id d3sm10701190pgc.37.2017.04.15.21.12.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 Apr 2017 21:12:27 -0700 (PDT) From: Wei Yongjun To: Thierry Reding Subject: [PATCH -next] gpu: host1x: Fix wrong pointer passed to PTR_ERR() Date: Sun, 16 Apr 2017 04:08:10 +0000 Message-Id: <20170416040810.10476-1-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 17 Apr 2017 00:32:20 +0000 Cc: linux-tegra@vger.kernel.org, Wei Yongjun , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun PTR_ERR should access the value just tested by IS_ERR, otherwise the wrong error code will be returned. Fixes: b386c6b73ac6 ("gpu: host1x: Support module reset") Signed-off-by: Wei Yongjun --- drivers/gpu/host1x/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c index f05ebb1..ac65f52 100644 --- a/drivers/gpu/host1x/dev.c +++ b/drivers/gpu/host1x/dev.c @@ -172,7 +172,7 @@ static int host1x_probe(struct platform_device *pdev) host->rst = devm_reset_control_get(&pdev->dev, "host1x"); if (IS_ERR(host->rst)) { - err = PTR_ERR(host->clk); + err = PTR_ERR(host->rst); dev_err(&pdev->dev, "failed to get reset: %d\n", err); return err; }