Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp893237yba; Thu, 18 Apr 2019 11:19:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzKAr2JiP/XZvUg6RoWCN5Pk9/v4Q9CqvpPDn5xY5O8MpsXRVm27N3HbQ/4/MfsaYVGdzyz X-Received: by 2002:a17:902:9a83:: with SMTP id w3mr98258370plp.241.1555611585210; Thu, 18 Apr 2019 11:19:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555611585; cv=none; d=google.com; s=arc-20160816; b=O1usdDPoqHyc0yjeb/HWIIovAO61xpiNN+UjpQbEXvueZS1YPb3vvpLeBn2a0qVx8m PMI+fi9Zz06Ve/SFqbsNBMyq5lThlF7oy3U53tznwCk7xdrhzalNExE4mLCDRknt8nxL nfZCUIak2+sF5XJaSLYj0XE70CBOmaHY8A/uU2zFI5Th6wClnVkSsoRmwTLtVoRh5hAr vR1YBSEjVyZRrrRNB/Nvn83QDlap+Ps45vjffM4qnZYX0vhbQPM/pQeCwuRkbrxVbmj+ AKtLG0XuDc3aV0P70+ompYgp8gvTDVpcojlrciYQX/7bwxqyllQ/C4xBSmLfB9iD7LH+ nZow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=prsQQGec/LAKcGcDOVlUcws21ok9IMQrExNEan6RhpA=; b=MZy3qBls1tuKmLoL2hWU0r1c+mz0UdJk8gJ/ZVCA8oGhotcUqQY3Ku8NOaek8K80Qy Ij8xHL+ekT/XiqR/ev44SnJNSqn5vspOz/Ut4CdilZZWEr8nhAoiPleGqkmuJU+p3rvQ PwKFbKa8kk8SFJuYYn/hKbrYU6gJLmIRt/Mk6KWYL0H//KU6qxH6iOs6VPZfUQldsanE OW/T+3bMHee1suhUo7P3KqJlHhd+LPD/eqS6qupoxGzB9eK6IYXtiOmU1ZeGTCnCD5UI la6rsNl0ajH0UyHQ+Jx2GnB25mKkDFl5OPCJ3t4BCuGuB/KAtbpMb5ThFN/W95p6wQzv WNjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QXr3KBH5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d17si2524017pgg.367.2019.04.18.11.19.30; Thu, 18 Apr 2019 11:19:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QXr3KBH5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391801AbfDRSQi (ORCPT + 99 others); Thu, 18 Apr 2019 14:16:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:44034 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391765AbfDRSLo (ORCPT ); Thu, 18 Apr 2019 14:11:44 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B9E4620675; Thu, 18 Apr 2019 18:11:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555611104; bh=p1f7TdzYgphg43M3jHgFhO+Vju8BZayxXHbmZ626W34=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QXr3KBH5zKzmxqASo/nfC5NPCtULW9yJmRN1hlrSNNTSUtaHH5EY7Xzv6R4bal/eQ 46nQ0CtHDQV7G9sOHQct1udTT4LpG7VZrvOd17quvwSqF7c1Ehqnx+hYb/4jnIDQtR 7RUdMNiegvHQGzFBJK+Z2RsL6X+Ltpy70Zb6oSeY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, YueHaibing , Ben Skeggs , Sasha Levin Subject: [PATCH 5.0 59/93] drm/nouveau/debugfs: Fix check of pm_runtime_get_sync failure Date: Thu, 18 Apr 2019 19:57:37 +0200 Message-Id: <20190418160443.477087307@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190418160436.781762249@linuxfoundation.org> References: <20190418160436.781762249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 909e9c9c428376e2a43d178ed4b0a2d5ba9cb7d3 ] pm_runtime_get_sync returns negative on failure. Fixes: eaeb9010bb4b ("drm/nouveau/debugfs: Wake up GPU before doing any reclocking") Signed-off-by: YueHaibing Signed-off-by: Ben Skeggs Signed-off-by: Sasha Levin --- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c index 88a52f6b39fe..7dfbbbc1beea 100644 --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c @@ -181,7 +181,7 @@ nouveau_debugfs_pstate_set(struct file *file, const char __user *ubuf, } ret = pm_runtime_get_sync(drm->dev); - if (IS_ERR_VALUE(ret) && ret != -EACCES) + if (ret < 0 && ret != -EACCES) return ret; ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_USER, &args, sizeof(args)); pm_runtime_put_autosuspend(drm->dev); -- 2.19.1