Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2388811lqp; Sun, 24 Mar 2024 17:14:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVsV8gIFEsf2PavN/h7Mj4X3dyHjswmvDoU+dFTpucrksd7lbiN2LZ5Co/RwqalJnAeS2IqnWuJcfoEgjuW15pbu+1ZK17J9sqb12UgUA== X-Google-Smtp-Source: AGHT+IEbGZeh71l0kOnBTUXCZULz3B5D2cN0ZAQcOMzud/i+qyw/7yjZMuDb0sbvcdSkD8MQGS+u X-Received: by 2002:a17:90a:4613:b0:299:3035:aede with SMTP id w19-20020a17090a461300b002993035aedemr3351292pjg.44.1711325694575; Sun, 24 Mar 2024 17:14:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711325694; cv=pass; d=google.com; s=arc-20160816; b=GbmJUZwk0eQhnfWNSsPKhQJre0K4P8F1AjuVNl2pjoCDx0itnoiHgKbXDd86407HYa y/m02+BeoX1AWyGPXyZfJxRRcMq0gKhNITzazVBHK9k/NHhjBTLxo4+z57yBjmfhjG8o qHoi/UjHs/BrOZTRcrF0Y3uP2t5uHrd5vDm4yN9vwk84WpeyXCBL9/cJ9MfcXXSm45J4 tlD3oglixVgIcwvgGm4X9gC2Vtvc3UxfegR43ZG31eLRrCmiyXWsgqHoVs9fwgIhsJUo oyAjhe7ACdvx11nHifUxdvG5NWAhkMbQ2PD0s6+3ZlDi9DSW+ptr+Id25+3QWoCNp8me 7uWQ== ARC-Message-Signature: i=2; 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=5NgxPpPFYtNpnCg2DpHKq4FbuMOTvLfzGd90XaJUgIU=; fh=PkZPX8LGtk6tnJM2YeFswSw+2gGR2ws/MDmTdq0lHDs=; b=UjNKhSNO6phtJav0xDcV08/eUsYULPJXFpecgTcOqsYCHlj0BduN28iDIw0KJNjAsW 5v7kFb0p9gt6EqXLU9ak4wRcqwfltzuHnnnc6rksd6J+59TC67FCA/M5ydPQUTpxXzTh t8bJ/9X8ObO87MT5EN8wtFshCgVHCq0DaW7Zu9emWBRnRy1mDtVJcP1DKpdKJIrKTbqE 4HAjcS1XwHCHAQEYPzvjmrgiXxiM9TqOms/L6ZDoRx8++HXqnPhzYW2i4OPQAEuxahzK d4O4jPCOUcVUAkt51yRy1UNoo/vyIw7UtrCDZeMD7kshHl5/GygVnL+qhpCoLH6umY4b vujA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="oIuaA/km"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113346-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113346-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k6-20020a17090a4c8600b0029ff73e6b4fsi6407183pjh.69.2024.03.24.17.14.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:14:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113346-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="oIuaA/km"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113346-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113346-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 6D24128109C for ; Mon, 25 Mar 2024 00:14:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1120B1989EC; Sun, 24 Mar 2024 22:42:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oIuaA/km" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19FF3199252; Sun, 24 Mar 2024 22:42:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320147; cv=none; b=SXGzUOUZYYnOzYMsiWzWW5I0s39o5rBn1vrlXO8ex2b3PQh8X2ilLYA0ynt30fjZYgX724REmapFcgzZ2uh++CfLg4Bc2/4xFLHspi8bliTrsjkBXfg/uTylmSO8CbMsnUul5pFnosfQDQnQWte6Mje1M+utin8TuyP908ny2fE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320147; c=relaxed/simple; bh=aoaVGp9uRd7q1yvISqaBgafhKrn8LdUJODoUaqJwLec=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uaGOU/f3BPsu/ed+Ob6xicUsYFy1AvGfHwnCUPBE5qvz+j94TghM5mdezSjAjVqDEzHtj0oNzsaZz16+bE/eL/wUSpY6s0RvZTuh9dIZ5SWEgXNiq6YfIxpIMgTJey98md2CjyNh1wDtx95aOkA1DQ0fvxGOeh0Wec8z5A7U0e0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oIuaA/km; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 435D2C43399; Sun, 24 Mar 2024 22:42:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320147; bh=aoaVGp9uRd7q1yvISqaBgafhKrn8LdUJODoUaqJwLec=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oIuaA/kmlcOh7hEe+VVkC5neqFesWPZjUEaiWy3Vvzl5Y1ZIRyBoibMsTG0cWOptk tligBageWKnTQPdw1kfdCPHI/stnMLgoctFc1bbJQE3ZFgfm9bJPlwyoBLDJWCp610 NtAFspIAOeptzkvWiuPAUMWToTgZafXf4ajeDCVMA/bGgR0bfQfcg5/zUcbtsMu0Pq pVtqA+aKMCt8CQ9P8Nm14/ifCU+6BQ+79GnWkDUBCKGerJUMfw+Mm8dKlfVKD74XsK twwaK86DiO+AZULeI026jVeLQhrZ3avQBo8KKfuubvkVvsp4nynNo7g0Z+gmTq5752 ZrBXMnjGf0TQQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Christophe JAILLET , AngeloGioacchino Del Regno , Stephen Boyd , Sasha Levin Subject: [PATCH 6.8 455/715] clk: mediatek: mt7622-apmixedsys: Fix an error handling path in clk_mt8135_apmixed_probe() Date: Sun, 24 Mar 2024 18:30:34 -0400 Message-ID: <20240324223455.1342824-456-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Christophe JAILLET [ Upstream commit a32e88f2b20259f5fe4f8eed598bbc85dc4879ed ] '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 Link: https://lore.kernel.org/r/2c553c2a5077757e4f7af0bb895acc43881cf62c.1704616152.git.christophe.jaillet@wanadoo.fr Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- 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 9cffd278e9a43..1b8f859b6b6cc 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.43.0