Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3037958pxj; Mon, 17 May 2021 16:10:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+EkEt7f14cbKbeLLG6dtzldoZfxkeDc7ZE/xyqXMhqKGoLn44xUM7+lY6JxAUALQ83frN X-Received: by 2002:a02:294e:: with SMTP id p75mr2369832jap.34.1621293037851; Mon, 17 May 2021 16:10:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621293037; cv=none; d=google.com; s=arc-20160816; b=A3Y4yXprUnY9qWUFNKIiHi1PeOu+dP5IokiKiiDbLAYEo9Wfjd4BnnW9ifT8RF86BJ +WZ3oNO9c+GKWVkLmsWV+AEye1MFOpfCZtx7NbLIrZpsdAw7ZeKf2R3ImoWVW9rNPjjK ZWqK4+LDKqp1GqxXX8Kku5iZcR674SsUoULdM+hA3qpqZ8g6o7B55KcPABZupIb2pMl2 Fi6/uK2FgrNjM1y6/lwIFMTIDpYPnoPTzmYjKJ5mtOzDhcsKI82JAXqOsYDlmpXwvMBx tJMwiEdaQHlSUV4QglygJ5b7pxu0MP9/X2LqOugmwT0mdEJVQT9qb1+c9BJAZB4A2WT+ +sHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6wzo4/qi6HYDugcqxD5bWJFTz6koTLMu1olqIi+0V7c=; b=OaTPRK5TeCqVzE0U8r9k3KQWZo6Ig99s7CC6kKDxXWvWAc2SEChF7DIvF3f6S7CwaU hY56ElxB1vBJCNaYG9/JQuTU5f865lk0Fxy+qTReb85WPNTDGXnDN2DRHP87sWtmqC1S lCctJ5qcO+3HgOOnEOwOUrC25BsKn14gsLGzf0XxFrp3wxbfiiXbwrd/Cksm8447bA37 JBDabdoS7GCm0GJPsPJpBTxFmOu877mDBdbuU0H+MS4GAk799TQQ0awOEqQj07Mms2fR 7RiR5Nf3+FJRk/Afr3RpQtXNXmGp9qdDSBtkSCAarfWskgfnbBByX3gSmhKUvUMR10VU gkxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aW6rKFHH; 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=pass (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 p14si20385002ils.62.2021.05.17.16.10.20; Mon, 17 May 2021 16:10:37 -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=@linuxfoundation.org header.s=korg header.b=aW6rKFHH; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237183AbhEQOVf (ORCPT + 99 others); Mon, 17 May 2021 10:21:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:35732 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239119AbhEQOSq (ORCPT ); Mon, 17 May 2021 10:18:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5C68B61406; Mon, 17 May 2021 14:10:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260620; bh=ouWKma5hiW3rzLKl5d4oGwHRPdUEefIsJAcZnNT3+QY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aW6rKFHHnS9JPMWt/RMRu85I4RejjeJiR15uHzZH0pfeImgdxOl7h962puQDzHhbw aCevc5asRE5e4mWt6PpvuFujyWWUKaw7Wp32KeIYQrMc3olqFRiECYhrj9Yv40mLex nahk0lINJavv5iahOoCcOQ2fR28/sktrrcnSqnqU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guangqing Zhu , Bjorn Andersson , Daniel Lezcano , Sasha Levin Subject: [PATCH 5.12 164/363] thermal/drivers/tsens: Fix missing put_device error Date: Mon, 17 May 2021 16:00:30 +0200 Message-Id: <20210517140308.152957638@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guangqing Zhu [ Upstream commit f4136863e8899fa0554343201b78b9e197c78a78 ] Fixes coccicheck error: drivers/thermal/qcom/tsens.c:759:4-10: ERROR: missing put_device; call of_find_device_by_node on line 715, but without a corresponding object release within this function. Fixes: a7ff82976122 ("drivers: thermal: tsens: Merge tsens-common.c into tsens.c") Signed-off-by: Guangqing Zhu Reviewed-by: Bjorn Andersson Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210404125431.12208-1-zhuguangqing83@gmail.com Signed-off-by: Sasha Levin --- drivers/thermal/qcom/tsens.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index d8ce3a687b80..3c4c0516e58a 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -755,8 +755,10 @@ int __init init_common(struct tsens_priv *priv) for (i = VER_MAJOR; i <= VER_STEP; i++) { priv->rf[i] = devm_regmap_field_alloc(dev, priv->srot_map, priv->fields[i]); - if (IS_ERR(priv->rf[i])) - return PTR_ERR(priv->rf[i]); + if (IS_ERR(priv->rf[i])) { + ret = PTR_ERR(priv->rf[i]); + goto err_put_device; + } } ret = regmap_field_read(priv->rf[VER_MINOR], &ver_minor); if (ret) -- 2.30.2