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 B81E1C43334 for ; Thu, 14 Jul 2022 06:50:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233034AbiGNGuJ (ORCPT ); Thu, 14 Jul 2022 02:50:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232166AbiGNGuI (ORCPT ); Thu, 14 Jul 2022 02:50:08 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEBFE248F3 for ; Wed, 13 Jul 2022 23:50:06 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id x10so594211ljj.11 for ; Wed, 13 Jul 2022 23:50:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=kAMorpNPpq8Kl7mIQPaFEYYx6iRT5mkDQv6ldaOiuso=; b=mCtgy7WJTcIR5VvYFE1mQpSdwHFub/JxquNNbGjOEDG5kerZcvfIWuR/Q4SfMdeLCM LKPbhc4nez83WRVbxrYgZnSGGOfCShXYSZVg1nlUWSu3Nkz5eoiwG9GJ9dxxk8GZCVMj 0VGmzNW+39nIVWiAdU11NFp9Pqt0bKUKDpVd30O2rLoijaUPWKYITYSu52p4vyn1YxLK itzn4rLQSdioMpwWIsLTXSl5Rm0aib09E33je8nhM053J2+ni+JPbwJds70N7qPumteu aiRHfv0M8e3NXr0lJCxtybrL33+/GUf9upn7Agyqg7bvEbG8rpodGLO0VwrYap7piiPI DA9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=kAMorpNPpq8Kl7mIQPaFEYYx6iRT5mkDQv6ldaOiuso=; b=gSoP3YIBCZP7I/cU0PyOgFfTPbAIoXC2BTXwlE6NifAiKTrnRkbrZRF2U26Y3/uXww +FLNEoKe9mr6SzH6FwlDl5OM0AUUC+NjSz2DYZ9qj/R7Yy2JivQaXg05xL21D1yefbOZ XIp+9qE9uq+IGK4ng3uGY6xOLfDJKzYVoVezKyrl6NZVMovBrzRnjjnAV8sl8BojfOnX HDPSkFOu+jM/cEDrGW/oJn2XmU0VNPCfJCcVfH6w5+4AQBWOnai1q/g2+JYFEYiBwci5 tRIbC2TNTVA81OkVYoQ+y8WkhYCVa/Wl/v1It9CJTZXhD6woqhLPJJkEX2akhiDv8oKx 4YTQ== X-Gm-Message-State: AJIora93Q3SxyiPqF28eEnN2hXCUReW3gyTShb7tteQWsCnbYSdcyTpj aDbiIaDBI+Sn7lf0pFj78k+WYg== X-Google-Smtp-Source: AGRyM1uugxfr8VnRrNRyLEftcuT/EW3N+W2M709baxf4ALu+7XKMmiU/fc1xj1s3byOkIhsLkTeYbw== X-Received: by 2002:a2e:968b:0:b0:25d:67ce:134c with SMTP id q11-20020a2e968b000000b0025d67ce134cmr3861590lji.277.1657781405298; Wed, 13 Jul 2022 23:50:05 -0700 (PDT) Received: from [10.0.0.8] (fwa5da9-171.bb.online.no. [88.93.169.171]) by smtp.gmail.com with ESMTPSA id m1-20020a056512114100b00489fdc9ac15sm195626lfg.42.2022.07.13.23.50.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Jul 2022 23:50:04 -0700 (PDT) Message-ID: <32b30b60-26f7-50e9-7dca-c25bc3f4014d@linaro.org> Date: Thu, 14 Jul 2022 08:50:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v10 1/2] thermal: Add thermal driver for Sunplus Content-Language: en-US To: =?UTF-8?B?TGggS3VvIOmDreWKm+ixqg==?= , Li-hao Kuo , "rafael@kernel.org" , "daniel.lezcano@linaro.org" , "amitk@kernel.org" , "rui.zhang@intel.com" , "robh+dt@kernel.org" , "linux-pm@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 14/07/2022 07:32, Lh Kuo 郭力豪 wrote: >>> +} >>> + >>> +static int sunplus_thermal_remove(struct platform_device *pdev) { >>> + struct sp_thermal_data *sp_data = platform_get_drvdata(pdev); >>> + >>> + thermal_zone_of_sensor_unregister(&pdev->dev, sp_data->pcb_tz); >> >> You used devm to register, so this looks wrong and will lead to double free. >> >> > > You mean the remove function is not needed. ?? At least this call but after its removal the entire function would be empty, I think. Best regards, Krzysztof