Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2639795pxa; Mon, 17 Aug 2020 15:11:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzz0a4lPr7Xz/UVTRRryMERcOwwlpF+af6rZT7xHupV85UlYz4H24JSV86Dcamc1CuCMhRR X-Received: by 2002:a05:6402:30a5:: with SMTP id df5mr16629260edb.18.1597702289896; Mon, 17 Aug 2020 15:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597702289; cv=none; d=google.com; s=arc-20160816; b=rQ/pCaj7f520iptf8ID6nJJ9DrE0tNnEznsW2U/JAtwrOiULuC2fordiJtgPc+2DR6 Fxw2weUuJZnoBQr3JV+vplFi+AfCzaWnJlNbVOjCnG2Siu5yj8WPrt0AhTu+u9n+u05q GGVEuEstTQ5zz1jNdt7NC38hYvALyj0BPIF9uQ8GYxxJhOd9DGvHwx03WH63mmWqSztf gQluMiCHA1Hqq2e87xFIR+/yiQsofpK46Hx9h9S3ezVoNvEjtoFlNJlKOi7CdJKwvwvH RVlz+dkVmONkz9zRLzKLcJV0MSdJv79haAs5G7I2ZllFtTUgoyCfgCBHOoERSZ3vm+sA lDqg== 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=CKviFxPXYFXafQ/v2Xsb4rN6RyEpcX3SSuys324Egko=; b=REW7eynTcs3lejz4bEmnKTOtRP5mdJp2IO+mn5hnDGVyb3kHVZVC+TLPVXNqR3GkZL x0yPQRvON0A70GlT1+W2+Ti1pBc5vEp7CVrE6vxne4cDUMbHwFFvXPx5JbG1QqbnLw/w t1JALLPZDFY/EZXbccaGNUBZP0n2m8p36Dd5DWxT4v+N9wednfM4pqe0JxOVx/LKAPHu hTMKt02sV0apQGveQIoTBT/vTYYFTvzKmx7UKRyE4q9qRHGQWYgwBHoPoyTIXSN++qRp 4FQi1/AGFikmXXDtGPioe9DsEuZ3AXkCWZB67r8XjoltN5tJKPq4eoG1SkZXjOrTUi80 qa7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="kblmOYq/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g22si11716169ejd.159.2020.08.17.15.11.06; Mon, 17 Aug 2020 15:11:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="kblmOYq/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387861AbgHQQ2w (ORCPT + 99 others); Mon, 17 Aug 2020 12:28:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:39048 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387863AbgHQPwp (ORCPT ); Mon, 17 Aug 2020 11:52:45 -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 8867E2063A; Mon, 17 Aug 2020 15:52:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597679565; bh=gHmsU+XG61m0rQS0oJmH2tnjbgwl5bnj4xGsCcFs6/U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kblmOYq/O30Riv8Q9QBUl8wtnCB2c9WWZ4dCw8CEuBb67Is37bEEZlPhZb4Hx9ZRW P4A2ga9FeBLvsmth+CZgjhhweoPRSPIOitwOqqE2VL5qeV8E43jtmKzexajnA7Z9NO ck2PFc4sXGJvJVm/Z3RYnEhqvfvBtX1NEfxdqIyE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Daniel Lezcano , Sasha Levin Subject: [PATCH 5.7 227/393] thermal: ti-soc-thermal: Fix reversed condition in ti_thermal_expose_sensor() Date: Mon, 17 Aug 2020 17:14:37 +0200 Message-Id: <20200817143830.634521543@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143819.579311991@linuxfoundation.org> References: <20200817143819.579311991@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 From: Dan Carpenter [ Upstream commit 0f348db01fdf128813fdd659fcc339038fb421a4 ] This condition is reversed and will cause breakage. Fixes: 7440f518dad9 ("thermal/drivers/ti-soc-thermal: Avoid dereferencing ERR_PTR") Signed-off-by: Dan Carpenter Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200616091949.GA11940@mwanda Signed-off-by: Sasha Levin --- drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c index 85776db4bf346..2ce4b19f312ac 100644 --- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c +++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c @@ -169,7 +169,7 @@ int ti_thermal_expose_sensor(struct ti_bandgap *bgp, int id, data = ti_bandgap_get_sensor_data(bgp, id); - if (!IS_ERR_OR_NULL(data)) + if (IS_ERR_OR_NULL(data)) data = ti_thermal_build_data(bgp, id); if (!data) -- 2.25.1