diff options
author | Junlin Yang <yangjunlin@yulong.com> | 2021-03-30 08:26:55 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2021-04-08 15:57:14 +0200 |
commit | 57c855f742c192a42fc4f37c8aff6ebebb61ae72 (patch) | |
tree | 4c3f57583373404204b7ac0196cf5a4eed726913 /drivers/pinctrl/ti | |
parent | pinctrl: rockchip: add support for rk3568 (diff) | |
download | linux-57c855f742c192a42fc4f37c8aff6ebebb61ae72.tar.xz linux-57c855f742c192a42fc4f37c8aff6ebebb61ae72.zip |
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: Junlin Yang <yangjunlin@yulong.com>
Link: https://lore.kernel.org/r/20210330062655.1027-1-angkery@163.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/ti')
-rw-r--r-- | drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pinctrl/ti/pinctrl-ti-iodelay.c b/drivers/pinctrl/ti/pinctrl-ti-iodelay.c index e5848269175a..4e2382778d38 100644 --- a/drivers/pinctrl/ti/pinctrl-ti-iodelay.c +++ b/drivers/pinctrl/ti/pinctrl-ti-iodelay.c @@ -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); - if (!pins) + if (!pins) { + error = -ENOMEM; goto free_group; + } cfg = devm_kcalloc(iod->dev, rows, sizeof(*cfg), GFP_KERNEL); if (!cfg) { |