mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
clk: qcom: Return expected ENOMEM error on dynamic allocation failure
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: ee15faffef ("clk: qcom: common: Add API to register board clocks backwards compatibly")
Signed-off-by: Vladimir Zapolskiy <vz@kernel.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260629162127.3910603-1-vz@kernel.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
This commit is contained in:
parent
546e0bc2aa
commit
22d9257f08
|
|
@ -169,7 +169,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;
|
||||
|
|
@ -186,7 +186,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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user