Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp439606rwe; Wed, 19 Apr 2023 00:45:28 -0700 (PDT) X-Google-Smtp-Source: AKy350YBhXcmFVpEdnfZCEo2lQcyKUkjliza8z/eUn2kbOnewWqj90M3K1ac94Q7TFgSoJ5A2Vgs X-Received: by 2002:a17:903:2442:b0:1a8:1d1e:407b with SMTP id l2-20020a170903244200b001a81d1e407bmr1796501pls.64.1681890328415; Wed, 19 Apr 2023 00:45:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681890328; cv=none; d=google.com; s=arc-20160816; b=bdD2T9tjtztNJvbxMBVhDH6J8S+5YWWlEswhj6YK6hA1jqoiZt0XdJ1XaS3ti10/VM RgXIuaQgCixrT9/LYIRuOUbw2cKTX5ounOhA4s2xe26/zH3eLQxM4UIprC7iR52ZeKfC 7l04P9UA/gDhbffB6KpcfiOQ1R3fHW+NlwIiVSzJnThyyqwPvmeufZudnDXQ9wxW4w0m 3ah/fnNziPvbRU/B6sHY4LazVhQK8suN6uhAsxGoyOcAI6gjyx0RoYHgcjDRCJ0tupp4 uJxTBTC/GDNecDkD4dBk5pKb2CPME2+EtxqCX0m5aCtkJvn8NXvkrD8wkOpKPCvdluT0 80Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=O11cNkDH5z7t2NN2bRH4l8Rl3tYZZQX8cjJddRFOqdc=; b=mL+1Phu+rUbzaL51zIvv7cx8MOSQ8iYjsUdWbRXTJnp9PTUfKAEF7ZGSVtaqgNU1hx aGxWnRsv25dSVE9CgFOm9TQ+09E1VuV7YtRsxAfuZZaWUE3RLSe1Y+91qbwvLSgiZm7y khhXZtgtzC8Jp7D+stTsgHpuEXZ8MpOLaAVntQc8h5E0s5sUnlKFNSBsJRDO/rr3T0ok koB0X6BD6NOW2M8cua3igci6cvIJx12iEDwMGIb1X0Zk9n1AHvGEL1YMu6oBKAkHwnF7 dWuN+BKcs7c+mSNrMahA1gwRuh+qDhHZTvAkMu2y31STATm49NCOCL3npju+N/0lK5Vw JF1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S5FZreJH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c7-20020a170902d48700b001a20c983d1dsi17250393plg.618.2023.04.19.00.45.16; Wed, 19 Apr 2023 00:45:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S5FZreJH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232354AbjDSHiY (ORCPT + 99 others); Wed, 19 Apr 2023 03:38:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232385AbjDSHiT (ORCPT ); Wed, 19 Apr 2023 03:38:19 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63F5993C2 for ; Wed, 19 Apr 2023 00:38:01 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f09f954d29so29919665e9.0 for ; Wed, 19 Apr 2023 00:38:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681889880; x=1684481880; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=O11cNkDH5z7t2NN2bRH4l8Rl3tYZZQX8cjJddRFOqdc=; b=S5FZreJHJ75PqZhRN52OhzYajo1bwJjNaRzt6RKP2GjK8e3PyRmRbLL+O8V5k8C6FY bO7IiFQzVpBTRQqQitPaZ7oYEKPu47teqdrxG6cddRkb+R9yseDz/+ArMYZUPDeiFV2g DTdZZvyqipQMaP4RmNbV/dnvJSpCxrA7nFmCSs3qrz8kopwZCaTJZFHPMykxkCQtvHgd mjE/sHhNt8ZHaRxpnLxlFA4awtvknmn7Du7F0qpTjbAivWTqQ5Qogb9rWp0dUFElAob+ n8Y6WLYueOoY+8xkil2OKpse81mFFf9T0/FIJGPc3ZXeyT8bpXioF3+rLozTISbV+J+Y Ohsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681889880; x=1684481880; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=O11cNkDH5z7t2NN2bRH4l8Rl3tYZZQX8cjJddRFOqdc=; b=MthjYpNWMFejwENGl/1/uRRebfSvpXghP3rSaU7LSNjJ6UtQoMO5p7WBSlJDK3cTdU iJyu4bOz4W0mwiaYE47EKUhlMTIgIFhLB/hVYzMs6ZSiOzpzg2KjfZIWmZu5qIRDWZ21 IzbeV0CaOtr23jpCQQjh5K9mqmxLeaIVLbhhO8FetP/LHknTRSV3qomBV0QOECLoFjLN tJVWetBYVE2u8X2euZfo1CcfXo3jLjXStBZPG30b3ELYnccBLPS3A7WpniDci0g2omI4 Cixo1J9iYdc5Z1MW19Scb+xu6zIrHk1rxt0EAh8uZ7nBOWfjoZtlpz1q04799PDwf5Fo yXOA== X-Gm-Message-State: AAQBX9e3sbPXeC+dLqLAWAxk+k9rT2bRGw9lTPQZ+6tgqtuL1nAqLV0c 8xBMW/JkiF8wMYpMUSK0dS3d1g== X-Received: by 2002:adf:ea4f:0:b0:2da:2aa0:13e8 with SMTP id j15-20020adfea4f000000b002da2aa013e8mr3924662wrn.26.1681889879800; Wed, 19 Apr 2023 00:37:59 -0700 (PDT) Received: from [192.168.2.1] (146725694.box.freepro.com. [130.180.211.218]) by smtp.googlemail.com with ESMTPSA id g16-20020a5d5410000000b002d1e49cff35sm14974598wrv.40.2023.04.19.00.37.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Apr 2023 00:37:59 -0700 (PDT) Message-ID: Date: Wed, 19 Apr 2023 09:37:56 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v5 1/2] thermal: mediatek: use devm_of_iomap to avoid resource leak in mtk_thermal_probe Content-Language: en-US To: Kang Chen Cc: amitk@kernel.org, angelogioacchino.delregno@collabora.com, bchihi@baylibre.com, daniel@makrotopia.org, dzm91@hust.edu.cn, error27@gmail.com, 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 References: <20230419020749.621257-1-void0red@hust.edu.cn> From: Daniel Lezcano In-Reply-To: <20230419020749.621257-1-void0red@hust.edu.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/04/2023 04:07, Kang Chen wrote: > 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 > Reviewed-by: AngeloGioacchino Del Regno > --- Dropped v4 and applied v5 Thanks -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog