lkml.org 
[lkml]   [2022]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.16 0179/1039] pinctrl: apple: return an error if pinmux is missing in the DT
    Date
    From: Joey Gouly <joey.gouly@arm.com>

    [ Upstream commit 839930ca1bd0c79cdf370d11462ef4a81b664e44 ]

    If of_property_count_u32_elems returned 0, return -EINVAL to indicate
    a failure. Previously this would return 0.

    Fixes: a0f160ffcb83 ("pinctrl: add pinctrl/GPIO driver for Apple SoCs")
    Signed-off-by: Joey Gouly <joey.gouly@arm.com>
    Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
    Link: https://lore.kernel.org/r/20211121165642.27883-12-joey.gouly@arm.com
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/pinctrl/pinctrl-apple-gpio.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/pinctrl/pinctrl-apple-gpio.c b/drivers/pinctrl/pinctrl-apple-gpio.c
    index a7861079a6502..c772e31d21223 100644
    --- a/drivers/pinctrl/pinctrl-apple-gpio.c
    +++ b/drivers/pinctrl/pinctrl-apple-gpio.c
    @@ -114,7 +114,7 @@ static int apple_gpio_dt_node_to_map(struct pinctrl_dev *pctldev,
    dev_err(pctl->dev,
    "missing or empty pinmux property in node %pOFn.\n",
    node);
    - return ret;
    + return ret ? ret : -EINVAL;
    }

    num_pins = ret;
    --
    2.34.1


    \
     
     \ /
      Last update: 2022-01-24 23:11    [W:3.636 / U:0.248 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site