diff options
author | Sergio Paracuellos <sergio.paracuellos@gmail.com> | 2020-12-13 17:17:16 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2021-01-04 15:38:34 +0100 |
commit | 7391031be7aa50583aea09bc00a37a74f64c1350 (patch) | |
tree | db82f2a4025057175935d8ddc675325bd4a71330 /drivers/pinctrl/ralink | |
parent | 53abfe67f024ab8eeac101d05703a49e7e154b67 (diff) | |
download | linux-stable-7391031be7aa50583aea09bc00a37a74f64c1350.tar.gz linux-stable-7391031be7aa50583aea09bc00a37a74f64c1350.tar.bz2 linux-stable-7391031be7aa50583aea09bc00a37a74f64c1350.zip |
pinctrl: ralink: rt2880: return proper error code
Check for NULL shall return '-ENOMEM' instead of '-1'.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20201213161721.6514-4-sergio.paracuellos@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/ralink')
-rw-r--r-- | drivers/pinctrl/ralink/pinctrl-rt2880.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/ralink/pinctrl-rt2880.c b/drivers/pinctrl/ralink/pinctrl-rt2880.c index c933e1a1d4fa..6e0bf7c4837b 100644 --- a/drivers/pinctrl/ralink/pinctrl-rt2880.c +++ b/drivers/pinctrl/ralink/pinctrl-rt2880.c @@ -206,7 +206,7 @@ static int rt2880_pinmux_index(struct rt2880_priv *p) p->group_names = devm_kcalloc(p->dev, p->group_count, sizeof(char *), GFP_KERNEL); if (!p->group_names) - return -1; + return -ENOMEM; for (i = 0; i < p->group_count; i++) { p->group_names[i] = p->groups[i].name; |