lkml.org 
[lkml]   [2021]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 13/16] soc: imx: gpcv2: correct pm_runtime_get_sync usage
    Date
    From: Peng Fan <peng.fan@nxp.com>

    When the return value is negative, there is error, otherwise it is
    expected.

    Signed-off-by: Peng Fan <peng.fan@nxp.com>
    ---
    drivers/soc/imx/gpcv2.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
    index 42b9be05e1f2..d2ce47a5ebad 100644
    --- a/drivers/soc/imx/gpcv2.c
    +++ b/drivers/soc/imx/gpcv2.c
    @@ -197,7 +197,7 @@ static int imx_pgc_power_up(struct generic_pm_domain *genpd)
    int ret;

    ret = pm_runtime_get_sync(domain->dev);
    - if (ret) {
    + if (ret < 0) {
    pm_runtime_put_noidle(domain->dev);
    return ret;
    }
    --
    2.30.0
    \
     
     \ /
      Last update: 2021-04-29 09:03    [W:4.148 / U:0.084 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site