From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 E8071373BF2; Sat, 12 Sep 2026 12:37:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789216663; cv=none; b=nLB0zqBnCaqlz48jjjH5NLOvhMbfHFYSliF4wfE+SdhN0Su5ak1KWWp7XBiIf2A52D17/M1UMNGsABpsA1dPShQRxhaZeACNGEe2izARAUl05yxxT+MmfcNI1F5FD3wP4v19doJPU7SqTwIRSzKiB1iyscqrHFvifTKE9Kbn3ao= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789216663; c=relaxed/simple; bh=kGPNCa7Q83cZRZpvm4jY/vBB6DfAdxor/EYE7qiXuj4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pcKuZdkJlNwxjNQ8CeMNGD27QOpNH6CXDPRvRhadExloaQXbEeIabAOZavFWFz6seNw4ODwCV/6N00ogvRm9JuuwXv25mzptw2huV562sox00iEj9BHB1duo3EGnsuzpwplpW6bzgz764KgPWTimoNA7LWcH27JNUdp7pKB0LAY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ZTI122vp; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ZTI122vp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E27981F00893; Sat, 12 Sep 2026 12:37:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789216661; bh=Ajxbf9op7Zuxj2j5Y6IzGMp83lnySEXjtzMnbDTIJEQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ZTI122vp7yCWsOhJej09x+p+u2QbnDS5odnq952gk7DUZh++5sE5qOHdJklgVD3kZ dnVK1TBU/LDP14/AFFxzO+XVwcKeaJqbORs7Eias+RiKutbRIsNYiAxxWhsaHNyle8 Y/McPGYQ5+1jEDNIMc6rFPJLb+BVMksJ/AMp8kpM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Vladimir Zapolskiy , Konrad Dybcio , Bjorn Andersson , Sasha Levin Subject: [PATCH 6.12 0781/1376] clk: qcom: Return expected ENOMEM error on dynamic allocation failure Date: Sat, 12 Sep 2026 08:53:27 +0200 Message-ID: <20260912065624.944353832@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065607.535295758@linuxfoundation.org> References: <20260912065607.535295758@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vladimir Zapolskiy [ Upstream commit 22d9257f08913b6eec3e8ece4d13d9c41f14428b ] If a dynamic memory allocation fails, the returned error code in clock controller driver probe functions on a few legacy platforms should be set to -ENOMEM instead of -EINVAL. Fixes: ee15faffef11 ("clk: qcom: common: Add API to register board clocks backwards compatibly") Signed-off-by: Vladimir Zapolskiy Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20260629162127.3910603-1-vz@kernel.org Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin --- drivers/clk/qcom/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c index e1a83ec481509..8061d0bf590ae 100644 --- a/drivers/clk/qcom/common.c +++ b/drivers/clk/qcom/common.c @@ -165,7 +165,7 @@ static int _qcom_cc_register_board_clk(struct device *dev, const char *path, if (!node) { fixed = devm_kzalloc(dev, sizeof(*fixed), GFP_KERNEL); if (!fixed) - return -EINVAL; + return -ENOMEM; fixed->fixed_rate = rate; fixed->hw.init = &init_data; @@ -182,7 +182,7 @@ static int _qcom_cc_register_board_clk(struct device *dev, const char *path, if (add_factor) { factor = devm_kzalloc(dev, sizeof(*factor), GFP_KERNEL); if (!factor) - return -EINVAL; + return -ENOMEM; factor->mult = factor->div = 1; factor->hw.init = &init_data; -- 2.53.0