Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1042853rdb; Sun, 7 Jan 2024 00:29:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IFxi7cM43KX4o9chNp0BpE5yVCt2sHKK/seVZzn80ZUCAyOQgknwtAbQcIfNsANaJCXGEWO X-Received: by 2002:ac8:7f91:0:b0:425:8a86:b287 with SMTP id z17-20020ac87f91000000b004258a86b287mr7546133qtj.65.1704616195076; Sun, 07 Jan 2024 00:29:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704616195; cv=none; d=google.com; s=arc-20160816; b=Em30uMQy3LowtSyjVqwu2V0Nfh/i6aA2R0L1g42dFUxsFMb63RWseJjmqfZE9/3c4c LwNixzG4XignNiP73B9/kDMETv51AHHEdXxnDI8Pote1vCkGjxgKcoWOUWDSGmyYYMpe JI3UsVxP86XH8WBJz7CrPQQ5bBwUtkCy82Nac++Pm/svGSUMCUOq3KEqzNGSbDUwLjlV ApRa8SEIXcrmq0JmDOy22w5BYplM3rauomCmIIN32f+2mZO1hbiBPpeDOeHplNiVyfvk Ls6sTOEEUhO4/yI297DDZKfb4EPVKp6wSg42wBIHAdUFG4IjQUkwY1Bi4rqggclOvYzr yoww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=i2n3txj6/jmrhz3DYsK0OV/s61I4FvsrFPJ83pERyYY=; fh=VE5ygJ027344UbZ5Bn9UrwxaQujFosy+eQJjlo/MqOU=; b=f4lbbsRWC8Fd9P5C39toC4qIkON5ZbcXqCpkksZBeusPouMTlc/RGM4jzEdxqH+t5s 55a8Ri5GOZou6QiBHNLT4WcgrZ2pEahslp4InjpjpAai/R++U3Q3Ds/qrXVpeTb0vhhY Hk4maRenPSZ0YPr8aGRr+dyOJQ4riz2fpY+Z6jkkEZrlX4+Me0Loq8FUQlGk5vvI9nIZ N+DEQcyPi+v/+5iZZf84EP0tGtn7UnpjJYIW4HXJkgoo9mkh/QApB5yHn8N+4uy9mRWL zovxCCj7GcmfbYaRWFAa0guKwx6yp7crlgnmA7uQeBWUbhnebQ5QYbWeHyRqHRFb16sp UTSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=Wr3PdlO8; spf=pass (google.com: domain of linux-kernel+bounces-18814-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18814-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a22-20020ac85b96000000b004281abcb3f4si5325789qta.627.2024.01.07.00.29.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 00:29:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18814-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=Wr3PdlO8; spf=pass (google.com: domain of linux-kernel+bounces-18814-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18814-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D02781C213D5 for ; Sun, 7 Jan 2024 08:29:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B936B12B7E; Sun, 7 Jan 2024 08:29:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="Wr3PdlO8" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.smtpout.orange.fr (smtp-25.smtpout.orange.fr [80.12.242.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9952A12B6C for ; Sun, 7 Jan 2024 08:29:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Received: from pop-os.home ([92.140.202.140]) by smtp.orange.fr with ESMTPA id MOXDrF2CYiIuMMOXDr7vDG; Sun, 07 Jan 2024 09:29:35 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1704616175; bh=i2n3txj6/jmrhz3DYsK0OV/s61I4FvsrFPJ83pERyYY=; h=From:To:Cc:Subject:Date; b=Wr3PdlO8sT2ulzf5BARVxJrPvz+SGF+saHX7S8M3y9fKfdUhM+hu9rxBkT2l2PZmn JcCuSJ5svMFqToYWc5pTW1Xx/b3341L7QRGc7xgCmHATkZt6RzSaa8dpkZ5MMg/toq nDQ/yHDITr0ax3ShBOwSX5nhiB/ywbFqXdEn5X1VXQuSfarnY3N5OgJNHSCmVgVrA3 UOA1jN3WBX3GvKTR74F9m5AXjRyOlMtXOf+lFvHrhPHG9JZ9XCzy9QaNqK3HzlT8dS 1XAKtxCj+wqE+CaeIhyXKEUy2YNt0UepBJ2HDg99G6ibKE5HbKGXJocXb8egHRbTVg AXyILBsppDazw== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 07 Jan 2024 09:29:35 +0100 X-ME-IP: 92.140.202.140 From: Christophe JAILLET To: Michael Turquette , Stephen Boyd , Matthias Brugger , AngeloGioacchino Del Regno , Chen-Yu Tsai Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH] clk: mediatek: mt7622-apmixedsys: Fix an error handling path in clk_mt8135_apmixed_probe() Date: Sun, 7 Jan 2024 09:29:28 +0100 Message-Id: <2c553c2a5077757e4f7af0bb895acc43881cf62c.1704616152.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 'clk_data' is allocated with mtk_devm_alloc_clk_data(). So calling mtk_free_clk_data() explicitly in the remove function would lead to a double-free. Remove the redundant call. Fixes: c50e2ea6507b ("clk: mediatek: mt7622-apmixedsys: Add .remove() callback for module build") Signed-off-by: Christophe JAILLET --- drivers/clk/mediatek/clk-mt7622-apmixedsys.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/clk/mediatek/clk-mt7622-apmixedsys.c b/drivers/clk/mediatek/clk-mt7622-apmixedsys.c index 9cffd278e9a4..1b8f859b6b6c 100644 --- a/drivers/clk/mediatek/clk-mt7622-apmixedsys.c +++ b/drivers/clk/mediatek/clk-mt7622-apmixedsys.c @@ -127,7 +127,6 @@ static void clk_mt7622_apmixed_remove(struct platform_device *pdev) of_clk_del_provider(node); mtk_clk_unregister_gates(apmixed_clks, ARRAY_SIZE(apmixed_clks), clk_data); mtk_clk_unregister_plls(plls, ARRAY_SIZE(plls), clk_data); - mtk_free_clk_data(clk_data); } static const struct of_device_id of_match_clk_mt7622_apmixed[] = { -- 2.34.1