From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DFAFC77B76 for ; Tue, 18 Apr 2023 09:25:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231285AbjDRJZy (ORCPT ); Tue, 18 Apr 2023 05:25:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231277AbjDRJZx (ORCPT ); Tue, 18 Apr 2023 05:25:53 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 595494681; Tue, 18 Apr 2023 02:25:52 -0700 (PDT) Received: from [IPV6:2001:b07:2ed:14ed:c5f8:7372:f042:90a2] (unknown [IPv6:2001:b07:2ed:14ed:c5f8:7372:f042:90a2]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id CAF09660323E; Tue, 18 Apr 2023 10:25:49 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1681809950; bh=WjDT+ciRzblDEja9H9yUPX/ktIWhUcxaLuEthRRfGXE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=DC7iYPraYsiDHayMU8h93EvVtgSQ+ZQfP/cUQ0Sw++EnXyR4tvD9ViXnVnMly25wd hFZaoDm/LvTL6kmJbnOLnKloLUo8uAGyuZTW8EOq/YVFJnGD+XVUKozZnWf1WzNoZP QqDPDj5xXcyoVSwX3qt+kG26OC66DEtNjwLSDDaYMLd/XGr/Xh6tgX79eN7zLrInGa 5HZPwJkjBCA9K3+sdG+bVqeOQXpLCAMq9LtKCCLgIhdO2Xgpiu7UHSZ/WqF3p2odxw wZHd/dphuiD6WPrKjLeWxulqroQdhhNLxCn9kOulH6WOmNXXKt1oLFva3npuDOHh1H Wn9W2Ebhun/9w== Message-ID: Date: Tue, 18 Apr 2023 11:25:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH v4 1/2] thermal: mediatek: use devm_of_iomap to avoid resource leak in mtk_thermal_probe Content-Language: en-US To: Kang Chen , error27@gmail.com Cc: amitk@kernel.org, bchihi@baylibre.com, daniel.lezcano@linaro.org, daniel@makrotopia.org, dzm91@hust.edu.cn, henry.yen@mediatek.com, hust-os-kernel-patches@googlegroups.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-pm@vger.kernel.org, matthias.bgg@gmail.com, rafael@kernel.org, rdunlap@infradead.org, rui.zhang@intel.com, void0red@gmail.com References: <48ae0e2e-257d-4ad2-afbc-2eb4b48e516b@kili.mountain> <20230417125533.3142236-1-void0red@hust.edu.cn> From: AngeloGioacchino Del Regno In-Reply-To: <20230417125533.3142236-1-void0red@hust.edu.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Il 17/04/23 14:55, Kang Chen ha scritto: > Smatch reports: > 1. mtk_thermal_probe() warn: 'apmixed_base' from of_iomap() not released. > 2. mtk_thermal_probe() warn: 'auxadc_base' from of_iomap() not released. > > The original code forgets to release iomap resource when handling errors, > fix it by switch to devm_of_iomap. > > Fixes: 89945047b166 ("thermal: mediatek: Add tsensor support for V2 thermal system") > Signed-off-by: Kang Chen > Reviewed-by: Dongliang Mu Good job! Reviewed-by: AngeloGioacchino Del Regno