From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (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 E0C94418A37 for ; Thu, 20 Aug 2026 11:13:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787224399; cv=none; b=jGtK0mDqIgMi0uNovbydSy+ZutZzLH5A/EczzONVabZbkQw6OIH0Cu+bYsqHCiXlVhfsO/IsDQSlal3veGv1A4niLhJ9jQ7xti51Yw1ZvbxBIPQxSG+pWCVe+0bLXZIeZw+QhaBUcUug7SJ8bjEvrRXW6EDY/lElc+nbCj1j/Uc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787224399; c=relaxed/simple; bh=Jnlm9/ph8dUyerL2gOM4nsth+MKXkHZ9Tj8imw3s9XY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gKufwHSzbCsqCeKz3WCinQgF9mnlED461nuVikUfRhk6rQCaE+CPQsn1XpIoSYkqT36xszk6NjufcJ2EC9qpi7jxzlh4OjLTqpoMm3xbBHrqqve2YSMzViqjGpmGTOb5cpAI648X2kqMY52Dyt04LNuGNcpOxDm/uwGe3Du8P5k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=TJCLvluH; arc=none smtp.client-ip=209.85.210.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TJCLvluH" Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-84faf0fa17eso2004325b3a.2 for ; Thu, 20 Aug 2026 04:13:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787224396; x=1787829196; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=/fA2Qh6VZccXsUY57cmXDESi+CqIM725cXDSiwO02/c=; b=TJCLvluHFePR5qh3xyBkq3J1jVhhX4JYXhiXrLRYyZi3DTTe5N7co+etzcGhog+zfu O3NvAkjqCXmc0y1PGZw+XCZSUK8H4lDRKGNL6wkM9W9xku/DnTg90CzUmklp9q2lA0eV RCGk4TAcDve6cJ8X1rbi5wg5IDxU/cMPOHyjmL8ppDHrXIZbkShGGOit1suuXWgeRMmZ GxZeI9sANW8IZI9KyXy0rD0EejSJaIDQqF+HnsQ6nMRZfHJGuwdGSNyZ4EAUG/zVCaQz qTJXztEsuueGZ6E2XgTA9a9YLtP0qjUeDarl08fT641hKiuDayrUTmpGxwTBlZvh1Ovb Vk3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787224396; x=1787829196; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=/fA2Qh6VZccXsUY57cmXDESi+CqIM725cXDSiwO02/c=; b=mnyh2nSi1yDJOeqF0RwXtm9LZCyjD0N+Iiad8Ji/jHU8jTcTlga9A9yDcggD0fsBXg M9OGyyfwuF1+z4loY5qm06d1sFfV7gmWKN7XgDf7ecs/vLoLNOo/rLAHEw68bD3h7GWs u9rM/1xPvSlKVGCM0xMrMTFvHjri/jxpPgmdAWOqqO70swKvH+5X7OBF1azac4UIQBYa anCNSxd4sM3xolmOsFRBZyK647bGp1CtbxeclwGnr+9e5eiI+KiHOmz4ga+ia28AGM82 lqIecw0Dmoqhyd9U9oZ2Zvg8Ap6gNFOV+10rgkPi3dtqeFPx1mn2CsInfm43uCJnMqjl jsPg== X-Forwarded-Encrypted: i=1; AHgh+Rq3O+ZEtDs74JG3/PCKqIa8lARczQqFEXjfRdePICjnbgO1J2vRB6TbRya1XWLDbftx+Fl/mmZFiCOgPn8=@vger.kernel.org X-Gm-Message-State: AOJu0YzOO9C6jETo5O71jxtvBDbhgBjzO03oTO/Z3BZxejKrkJzVv4iY fWcFOHxfJY04uDqf8ILBX9BxtoAfjogAIYjOXgfxTHw4P5lzXrfpBfKE X-Gm-Gg: AR+sD10u3JMI9B4DZeQJANl6PmUezFNeiPMFwt/h92A0orlaFccCKbhP2I+U+DcmFCA XEokOtcBjL3OvGl4zdNAUv3fO9y1b64L7afyNxK9CyFCyffTwfB6SA4vD2aAbJzVeDVP7IvS2Ny e7qCz+r5Kms/KBr7+xAwzUACFWOEttgEly6CeiBMAxi/SFkEGYvfdIMaj9F0Lv8ehDpigXWDK+u /Zeyy1UGOVOZzq67sHmQYqz0Zi/j0xs4H7qthhfKXDmgAYrIfze6k82RYVL5qnrawuWU26W4HXX djVq0+J0liz1/NM5kdylgKh31XWWoiA+Yg276sfS8DLrL4gLVix2A0nRJxXAA2TtDX+M9eeaRpM 0GYEu7bXGRtegBDgxMEl4aWiVJcJ5QvP+/wQxth1KaHs1KFU9AmpwfunxEBw5t04GuQacGbzJLc +fkXhYHrp3uIqztohlpsaXTVcfvvPju+JdpWqCnrn3L0yvTTFiaGSKQy0VFW8/24DqDWDXkV17r O/iMa2YvHGbEGOt6/hxh7qKzx3DMCGoX6MWbcXXXB75hbo97G4/MMER1EkNErSRRcxtpHFfH1VS pAoesvRJ7tgNGvg= X-Received: by 2002:a05:6a00:a20b:b0:84f:d7e4:3404 with SMTP id d2e1a72fcca58-851d3911ffamr20072394b3a.11.1787224396048; Thu, 20 Aug 2026 04:13:16 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-851d36185c8sm1515460b3a.38.2026.08.20.04.13.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Aug 2026 04:13:15 -0700 (PDT) From: phucduc.bui@gmail.com To: Mark Brown , Matthias Brugger Cc: Liam Girdwood , AngeloGioacchino Del Regno , Jaroslav Kysela , Takashi Iwai , Cezary Rojewski , linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, bui duc phuc Subject: [PATCH 0/5] ASoC: mediatek: mt8186: Fix clock error handling Date: Thu, 20 Aug 2026 18:12:48 +0700 Message-ID: <20260820111253.97866-1-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: bui duc phuc Hi all, This series fixes error handling in the MT8186 AFE clock code. The current code can return from clock operations without cleaning up clocks that were already enabled, and can ignore clock lookup errors while later using the affected clock pointers. This series keeps devm_clk_get() and propagates clock lookup errors instead of silently continuing with a NULL clock. The changes therefore assume that the clocks used by the driver are required. If these clocks are intended to be optional and devm_clk_get_optional() is preferred, the clock users would also need to check for missing clocks before calling clock APIs such as clk_prepare_enable(), clk_disable_unprepare(), and clk_set_parent(). If that is the preferred approach, I can rework the series accordingly. The changes were found by manual code inspection and compile-tested only. Best regards, Phuc bui duc phuc (5): ASoC: mediatek: mt8186: fix APLL mux setting error handling ASoC: mediatek: mt8186: Fix AFE clock error handling ASoC: mediatek: mt8186: Fix APLL enable error handling ASoC: mediatek: mt8186: Fix MCK error handling ASoC: mediatek: mt8186: Propagate clock lookup errors sound/soc/mediatek/mt8186/mt8186-afe-clk.c | 112 ++++++++++++++------- 1 file changed, 74 insertions(+), 38 deletions(-) -- 2.43.0