From mboxrd@z Thu Jan 1 00:00:00 1970 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 687663BF30A; Thu, 15 Jan 2026 17:35:39 +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=1768498539; cv=none; b=cGuFzr8efKrhd8kqdNN5fUD7xaxctGRf+tyJRTw9KaEW1sFaBa17xUKFbRpSEtwzV2AOXbvuYZbvqiD0CrKbl7mSEU+CO3LCkzt4X8qKjciLVHaoHzLYwOX7bjKiOC0EnybMlhbz9jakX/ogkr+pl+orCHogQhENg8mjqHeKPis= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768498539; c=relaxed/simple; bh=UjhgxRopQ0amcQ5l4CeMoF7JKoQkHx1YCcNHOaQoOKo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JMYdZvDF4N3gw7+NJusVMCrw7jKdFkCDqOk26VU25JFNt09lI2mkVPLpdog3vDg18/j2j54wcwYIupjWq/t4JfknbxQfGYvAn9a8HrfebOrckFL0fbuBwv3qaTVvEieKAgxXb+eslCsqUxp40BS9v/Gmk5ih+Ir4iJbmX8v5qHI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sEv0WnJl; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="sEv0WnJl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D929C116D0; Thu, 15 Jan 2026 17:35:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1768498539; bh=UjhgxRopQ0amcQ5l4CeMoF7JKoQkHx1YCcNHOaQoOKo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sEv0WnJlj7ZEXsVOls+zYDIOUdjEy0T9RCjFLqmsXtaId8WfB+ZTSrY7HJvWJT2K1 wzR4PrIWVV+Dz8r99hnxM7RELEF/X1dkG82orynTchV/KYZdLkuWZQyQpezLm2IEQt UO9bn+SHwW4I7uWe1ShqTZqSh4ijT6j78VhHiVtM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Christophe JAILLET , Mark Brown , Sasha Levin Subject: [PATCH 5.15 468/554] ASoC: stm32: sai: Use the devm_clk_get_optional() helper Date: Thu, 15 Jan 2026 17:48:54 +0100 Message-ID: <20260115164303.233278170@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260115164246.225995385@linuxfoundation.org> References: <20260115164246.225995385@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christophe JAILLET [ Upstream commit 374628fb668e50b42fe81f2a63af616182415bcd ] Use devm_clk_get_optional() instead of hand writing it. This saves some LoC and improves the semantic. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/f7987f18dadf77bfa09969fd4c82d5a0f4e4e3b7.1684594838.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown Stable-dep-of: 312ec2f0d9d1 ("ASoC: stm32: sai: fix clk prepare imbalance on probe failure") Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- sound/soc/stm/stm32_sai_sub.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) --- a/sound/soc/stm/stm32_sai_sub.c +++ b/sound/soc/stm/stm32_sai_sub.c @@ -1486,12 +1486,9 @@ static int stm32_sai_sub_parse_of(struct if (ret < 0) return ret; } else { - sai->sai_mclk = devm_clk_get(&pdev->dev, "MCLK"); - if (IS_ERR(sai->sai_mclk)) { - if (PTR_ERR(sai->sai_mclk) != -ENOENT) - return PTR_ERR(sai->sai_mclk); - sai->sai_mclk = NULL; - } + sai->sai_mclk = devm_clk_get_optional(&pdev->dev, "MCLK"); + if (IS_ERR(sai->sai_mclk)) + return PTR_ERR(sai->sai_mclk); } return 0;