mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 00:24:12 +08:00
memory: emif: remove unneeded ENOMEM error messages
Memory subsystem already prints message about failed memory allocation, there is no need to do it in the drivers. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220304082339.230938-1-krzysztof.kozlowski@canonical.com
This commit is contained in:
parent
56653827f0
commit
6ded3d7471
@ -1025,10 +1025,8 @@ static struct emif_data *__init_or_module get_device_details(
|
|||||||
temp = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
|
temp = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
|
||||||
dev_info = devm_kzalloc(dev, sizeof(*dev_info), GFP_KERNEL);
|
dev_info = devm_kzalloc(dev, sizeof(*dev_info), GFP_KERNEL);
|
||||||
|
|
||||||
if (!emif || !temp || !dev_info) {
|
if (!emif || !temp || !dev_info)
|
||||||
dev_err(dev, "%s:%d: allocation error\n", __func__, __LINE__);
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
|
||||||
|
|
||||||
memcpy(temp, pd, sizeof(*pd));
|
memcpy(temp, pd, sizeof(*pd));
|
||||||
pd = temp;
|
pd = temp;
|
||||||
@ -1067,9 +1065,6 @@ static struct emif_data *__init_or_module get_device_details(
|
|||||||
temp = devm_kzalloc(dev, sizeof(*cust_cfgs), GFP_KERNEL);
|
temp = devm_kzalloc(dev, sizeof(*cust_cfgs), GFP_KERNEL);
|
||||||
if (temp)
|
if (temp)
|
||||||
memcpy(temp, cust_cfgs, sizeof(*cust_cfgs));
|
memcpy(temp, cust_cfgs, sizeof(*cust_cfgs));
|
||||||
else
|
|
||||||
dev_warn(dev, "%s:%d: allocation error\n", __func__,
|
|
||||||
__LINE__);
|
|
||||||
pd->custom_configs = temp;
|
pd->custom_configs = temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1084,8 +1079,6 @@ static struct emif_data *__init_or_module get_device_details(
|
|||||||
memcpy(temp, pd->timings, size);
|
memcpy(temp, pd->timings, size);
|
||||||
pd->timings = temp;
|
pd->timings = temp;
|
||||||
} else {
|
} else {
|
||||||
dev_warn(dev, "%s:%d: allocation error\n", __func__,
|
|
||||||
__LINE__);
|
|
||||||
get_default_timings(emif);
|
get_default_timings(emif);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1098,8 +1091,6 @@ static struct emif_data *__init_or_module get_device_details(
|
|||||||
memcpy(temp, pd->min_tck, sizeof(*pd->min_tck));
|
memcpy(temp, pd->min_tck, sizeof(*pd->min_tck));
|
||||||
pd->min_tck = temp;
|
pd->min_tck = temp;
|
||||||
} else {
|
} else {
|
||||||
dev_warn(dev, "%s:%d: allocation error\n", __func__,
|
|
||||||
__LINE__);
|
|
||||||
pd->min_tck = &lpddr2_jedec_min_tck;
|
pd->min_tck = &lpddr2_jedec_min_tck;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user