Commit 57c855f7 authored by Junlin Yang's avatar Junlin Yang Committed by Linus Walleij

pinctrl: ti: fix error return code of ti_iodelay_dt_node_to_map()

when devm_kcalloc fails, use -ENOMEM instead of -EINVAL,
and consistent with other devm_kcalloc return values.
Signed-off-by: default avatarJunlin Yang <yangjunlin@yulong.com>
Link: https://lore.kernel.org/r/20210330062655.1027-1-angkery@163.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent c0dadc0e
...@@ -511,8 +511,10 @@ static int ti_iodelay_dt_node_to_map(struct pinctrl_dev *pctldev, ...@@ -511,8 +511,10 @@ static int ti_iodelay_dt_node_to_map(struct pinctrl_dev *pctldev,
} }
pins = devm_kcalloc(iod->dev, rows, sizeof(*pins), GFP_KERNEL); pins = devm_kcalloc(iod->dev, rows, sizeof(*pins), GFP_KERNEL);
if (!pins) if (!pins) {
error = -ENOMEM;
goto free_group; goto free_group;
}
cfg = devm_kcalloc(iod->dev, rows, sizeof(*cfg), GFP_KERNEL); cfg = devm_kcalloc(iod->dev, rows, sizeof(*cfg), GFP_KERNEL);
if (!cfg) { if (!cfg) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment