Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp737078imm; Thu, 13 Sep 2018 07:03:13 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbh2p9hy7hG/OzHEGW0PreOLitKm1PBMRo11V7eIZvUegfyJTbWCuCT91XqooU2FWtMBpqE X-Received: by 2002:a65:5004:: with SMTP id f4-v6mr7339690pgo.54.1536847393877; Thu, 13 Sep 2018 07:03:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847393; cv=none; d=google.com; s=arc-20160816; b=iHeFT9GLSi724AMYG0OVKU7sge/OLSeFZ8F3YcfumKyzbv3tRCWUCdIor5BgnBm+7D AjHVhC2uuXx0nfrDPyj22blOjskBlGbAVDYHpyzecnwG9eQezgfNp2DZRT1ns8jCuxoC 6zgxAuSkKoSYki9p6lpvMSpNI2EhFzuf1/uAYPgvK4lVoYKSpHrXxRxTBP335Rp9LvnV 2ngjnDVwbixwfYSMt58pYh8A5lzOm1v2HeQKlLc4NWiQRo9YPE3w9u3Uzr6bZiO7THm/ GbBUTsXtZQ2VjHW1nm3G51/Su6QWEP9VCW1jfr2xEK1mllUBUW6ZA03JK8bZ707Bk+bP WPgQ== 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; bh=+wlKfDjSWX4RoXI2j7cSJtaa1X5sqeSOs9iyQWiZ2eE=; b=pZjVGVzZqRAUS3c9Ip/wGbVDlcXPp/ODLhcwVaIAxaPpSihe2ISXel32wvhG2E7ia8 HJ0aUIvtXRz8HzjMsJsUCckr4qvHOMtD7FvhY9N7P24LISCzAC0E7nuvMln42bAXPGVK TW4fkGpseAlE/dfUELYTh0B5gpS1wQVuexINxOOuF/i9Boi6vk1yYokNWt33zXW6N49z MYPw1A6DIBi0Y7Uo454fBXLfbOxxcqfRu+dndd1NSFeOLMk8J2wB1RWPmMsNVo0ZECfA uRIUna9lm/XQH+HdpVkj3JJMpK3XQrIBE+Nq+iE85mIYu7kgZnw20MtlTrMW2+82RUnZ MCow== ARC-Authentication-Results: i=1; mx.google.com; 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 w126-v6si4292925pfb.232.2018.09.13.07.02.47; Thu, 13 Sep 2018 07:03:13 -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; 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 S1731987AbeIMTMQ (ORCPT + 99 others); Thu, 13 Sep 2018 15:12:16 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35256 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731126AbeIMTMQ (ORCPT ); Thu, 13 Sep 2018 15:12:16 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 8DAACD30; Thu, 13 Sep 2018 14:02:37 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Evan Quan , Alex Deucher , Rex Zhu Subject: [PATCH 4.18 157/197] drm/amdgpu: fix a reversed condition Date: Thu, 13 Sep 2018 15:31:46 +0200 Message-Id: <20180913131847.840637555@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rex Zhu commit ccf9ef0b0d10434dec5046bcfc4e834a7b1830fd upstream. This test was reversed so it would end up leading to vddnb value can't be read via hwmon on APU. Reviewed-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c @@ -1157,7 +1157,7 @@ static ssize_t amdgpu_hwmon_show_vddnb(s int r, size = sizeof(vddnb); /* only APUs have vddnb */ - if (adev->flags & AMD_IS_APU) + if (!(adev->flags & AMD_IS_APU)) return -EINVAL; /* Can't get voltage when the card is off */