Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp452696pxj; Tue, 18 May 2021 07:07:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzD3ltfnj8Fs6MoOaJez91drcL/U6Hq9WXGxWIsFuknXXI6QVwQ9InzCosIASx3asIYVXVk X-Received: by 2002:a92:c564:: with SMTP id b4mr4436852ilj.257.1621346830328; Tue, 18 May 2021 07:07:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621346830; cv=none; d=google.com; s=arc-20160816; b=OuYqgagsXTx53npWBDz5spvvHUI1glCcUaZn4cIjXSSucQ/iUP697w+37wqpPT7jUX 0RVn0XyL2IZE5yzR/NFknvvB+Ns0wkRN8nQkw3SHl6t8LfMYPAazbON0GXZF5+f0wbBY VEjauPh+8DADmR7G5Ds+YiGrTPWIFw8oQqgsAK8WKPBZgyUxuQe2mf13vlb9sqW0xtG8 VoIKOtClen/K/6ufgcuZC+6grdDrVUtwEq6e4ttuuTB5Xm8DuoibdaTQzv+r2KJ3kbzX SIr+B2dt+YxoYs1D2bl0/q1aigRIXrt2lSp0LUIMyFDdZmgobZ1X9ER36AgLlwwUgbJL rzdw== 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=IitkcH/Ms1pRv1cPev7fQ5W3YY+dHO9kAKBKevBOrfIuvB8jlQoHxbITF+kvzkS/A1 KyueCBnqMqxns3L5pknsF3ip4aIpE2H54RU29VwycoCGbTcmNKM/E7xdiiiksmivL4T4 qruEE0CEd/9vlwW6ie4m16v1rFd1dTNRU/Q+WDe5oZa7dVwiAjjYvkyRnGXTmx9xHSra k7XsCe/BA0B8nuNY7EDhbNCPcAxnhk75guBR1kJi5e0Qqh2EjH2U7F9rIr8Ft8g4lAdC mSxZUBm47uEk8/kmygABC6VrfDGIU0sQ9KHSz0kQePXsvdavgbmwLiri1SDZOaw7/MPF btyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bWHzqaoh; 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 l22si4522860jad.10.2021.05.18.07.06.51; Tue, 18 May 2021 07:07:10 -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=bWHzqaoh; 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 S245192AbhEQPlC (ORCPT + 99 others); Mon, 17 May 2021 11:41:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:40184 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243262AbhEQP0B (ORCPT ); Mon, 17 May 2021 11:26:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EED8361925; Mon, 17 May 2021 14:36:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621262173; bh=ouWKma5hiW3rzLKl5d4oGwHRPdUEefIsJAcZnNT3+QY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bWHzqaoh8lC0NV9EBaF/LCCUR7W3X3acG5lRdK7BeDMCHiwtw7VKLbHR9UWrXj8ke IXGvhgPO+QWYrK9Te/pZfWAZE6umwKnJZnSgAJ68xvbOd7w/IjLWvWhaNyyitN4CAq RtPbSHQnYgv2hN/BW2rdsTVmf6HGznz8s1AzDoLw= 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.10 126/289] thermal/drivers/tsens: Fix missing put_device error Date: Mon, 17 May 2021 16:00:51 +0200 Message-Id: <20210517140309.404933375@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@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