Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1476432rwl; Sun, 25 Dec 2022 23:10:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXuqp+RmaJQjQZoG+EJPDdl5eK5e5Ud0XD3NY+dKMJxWmtsl2rd2d+l0bfotkF4vlg89Rwf4 X-Received: by 2002:a17:906:3c18:b0:7ba:9b49:53d4 with SMTP id h24-20020a1709063c1800b007ba9b4953d4mr15718447ejg.71.1672038621827; Sun, 25 Dec 2022 23:10:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672038621; cv=none; d=google.com; s=arc-20160816; b=H8vO6Zb0N2btOnmenwm9Ce7pyvnqy64Wm7i7B0ffTfxZHxjecs1F+v26DBNFTR1EPU h6eJh6Kxv5NUJ6L8MlM114k8GZzTNDngiW3m5rTt3aTG+5NDLQ3ki7RAs1FjQd0ZBJC6 UYQ4pHQ/ABdP/iyH3ebCvEXtAEzYeN1cy8yhVRId5WjNBpqHUFl7eAAe9qsewi01+klP a/zkGYN3bk17uu3T+jo/bC0VP/AC7qsJHYCcJp5/vJh7Xe94zJ0LFSsHN3pzZnKHDV2t 0bTLKDNhjzIrg4+NNTjBpvtrsHdmyYrZ5JfNtycGi8mR+KCl9/eQ2oY4R4jt6VGHDMQq ly2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=nKoRBsCZk8t5IRW6q7FXOzmG70vM+tRWxxCkDHcgI5s=; b=LlYH/IwXzgojwt8DJI26uf4YB1+GoaQWrELAKthuQQAlH7Q5rhquyPFJiVSYupU5ma +a/ozpCJnbbYHHvKmQzC9p0HDpkVHktqm24ItxAKCUOsHvxoa69Uf189feFGdkr+KY2F QzQhOYjsT8sPK+9s6fambE5NHXcn64LMW4UzsRhmlsZ9CW8lk7EvDcbOqBEX9aqjrRsy ZrZSCjg0gJ/HBBonjuGoFFufNMiPOIN13aaHQSw7YWPaX9ONu6i8Se+V3f2xD5gs/7aV 7HXUjG9nHAiKsKxcSQgFB7AoWqqo+vDkG7qUBGBJ9nfXGPETzDyYTE7Lhyt3IEwQwCws 29gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Gh5L7i4l; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eb5-20020a0564020d0500b0046721c5b7e0si9372215edb.511.2022.12.25.23.10.06; Sun, 25 Dec 2022 23:10:21 -0800 (PST) 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=@chromium.org header.s=google header.b=Gh5L7i4l; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229626AbiLZG4H (ORCPT + 66 others); Mon, 26 Dec 2022 01:56:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbiLZG4F (ORCPT ); Mon, 26 Dec 2022 01:56:05 -0500 Received: from mail-vs1-xe2b.google.com (mail-vs1-xe2b.google.com [IPv6:2607:f8b0:4864:20::e2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E842D61 for ; Sun, 25 Dec 2022 22:56:04 -0800 (PST) Received: by mail-vs1-xe2b.google.com with SMTP id k4so5569158vsc.4 for ; Sun, 25 Dec 2022 22:56:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=nKoRBsCZk8t5IRW6q7FXOzmG70vM+tRWxxCkDHcgI5s=; b=Gh5L7i4lMdFGdpQcVXbyK2egNp5Z1yUnv6IBSCJIVgNBy8xEcu7FXNb0L5gzT9eP8z C+nRl2MuAO3DcFB2eY31UCof7isEZbIuENKeIinzKjIcHW2xZR/p0Qt8ht2DLvLrlMdA NtcVKDhvzKfjPGz17B1xY5nsAyPsyGGHsbTwE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nKoRBsCZk8t5IRW6q7FXOzmG70vM+tRWxxCkDHcgI5s=; b=U1/cQTed08vyJd00VEQWqt33eoq4OhqHADQCflO6ttgVKbCJKE4DOtw+/0eYf6MJZA zA6/1bW6WuJU3WGiNAwaWN4iWHIpL3J0stFvhURk36Wzy85xc3j5/RYNiqpM3ojEZ5e5 NFSQMIY4xy58ylqt01k8v1ujKVbrwP5x+izCkfCQoqg6V4t0g+Q/f9MCk6IciihYIZsF V0oogJntTtqKuWsknfRZLqTHydJbPMJ2piL/gr8PeY8znpB0yWicOl977fgtMO9wtL0c 9hNiHIhklMw01V6baMDxjcTdY8p5EvOxCruZyu2kRy8FWnT2PNNxn6rSQrj3MbXfWqy+ W1+A== X-Gm-Message-State: AFqh2kq6H24uTcIzLMQvy9P0o1eKngnhr5XAodhbSd1QHXPhJ+2gwBnL bd1hIXxI2MjlkpAeOsFcBJsW5drut1bFHHipHiVPYg== X-Received: by 2002:a05:6102:4427:b0:3b0:6da7:39ba with SMTP id df39-20020a056102442700b003b06da739bamr2383130vsb.26.1672037763548; Sun, 25 Dec 2022 22:56:03 -0800 (PST) MIME-Version: 1.0 References: <20221223094259.87373-1-angelogioacchino.delregno@collabora.com> <20221223094259.87373-2-angelogioacchino.delregno@collabora.com> In-Reply-To: <20221223094259.87373-2-angelogioacchino.delregno@collabora.com> From: Chen-Yu Tsai Date: Mon, 26 Dec 2022 14:55:52 +0800 Message-ID: Subject: Re: [PATCH v2 01/23] clk: mediatek: mt8192: Correctly unregister and free clocks on failure To: AngeloGioacchino Del Regno Cc: mturquette@baylibre.com, sboyd@kernel.org, matthias.bgg@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, johnson.wang@mediatek.com, miles.chen@mediatek.com, fparent@baylibre.com, chun-jie.chen@mediatek.com, sam.shih@mediatek.com, y.oudjana@protonmail.com, nfraprado@collabora.com, rex-bc.chen@mediatek.com, ryder.lee@kernel.org, daniel@makrotopia.org, jose.exposito89@gmail.com, yangyingliang@huawei.com, pablo.sun@mediatek.com, msp@baylibre.com, weiyi.lu@mediatek.com, ikjn@chromium.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, kernel@collabora.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 Fri, Dec 23, 2022 at 5:43 PM AngeloGioacchino Del Regno wrote: > > If anything fails during probe of the clock controller(s), unregister > (and kfree!) whatever we have previously registered to leave with a > clean state and prevent leaks. > > Fixes: 710573dee31b ("clk: mediatek: Add MT8192 basic clocks support") > Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai