lkml.org 
[lkml]   [2022]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.9 122/167] clocksource/drivers/oxnas-rps: Fix irq_of_parse_and_map() return value
    Date
    From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

    [ Upstream commit 9c04a8ff03def4df3f81219ffbe1ec9b44ff5348 ]

    The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.

    Fixes: 89355274e1f7 ("clocksource/drivers/oxnas-rps: Add Oxford Semiconductor RPS Dual Timer")
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
    Link: https://lore.kernel.org/r/20220422104101.55754-1-krzysztof.kozlowski@linaro.org
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/clocksource/timer-oxnas-rps.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/clocksource/timer-oxnas-rps.c b/drivers/clocksource/timer-oxnas-rps.c
    index d630bf417773..411f211185d3 100644
    --- a/drivers/clocksource/timer-oxnas-rps.c
    +++ b/drivers/clocksource/timer-oxnas-rps.c
    @@ -247,7 +247,7 @@ static int __init oxnas_rps_timer_init(struct device_node *np)
    }

    rps->irq = irq_of_parse_and_map(np, 0);
    - if (rps->irq < 0) {
    + if (!rps->irq) {
    ret = -EINVAL;
    goto err_iomap;
    }
    --
    2.35.1


    \
     
     \ /
      Last update: 2022-06-13 12:28    [W:3.387 / U:0.052 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site