lkml.org 
[lkml]   [2019]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH -next] ASoC: sun4i-i2s: Use PTR_ERR_OR_ZERO in sun4i_i2s_init_regmap_fields()
    Date
    Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

    Signed-off-by: YueHaibing <yuehaibing@huawei.com>
    ---
    sound/soc/sunxi/sun4i-i2s.c | 5 +----
    1 file changed, 1 insertion(+), 4 deletions(-)

    diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c
    index 9e691baee1e8..2071c54265f3 100644
    --- a/sound/soc/sunxi/sun4i-i2s.c
    +++ b/sound/soc/sunxi/sun4i-i2s.c
    @@ -1095,10 +1095,7 @@ static int sun4i_i2s_init_regmap_fields(struct device *dev,
    i2s->field_fmt_sr =
    devm_regmap_field_alloc(dev, i2s->regmap,
    i2s->variant->field_fmt_sr);
    - if (IS_ERR(i2s->field_fmt_sr))
    - return PTR_ERR(i2s->field_fmt_sr);
    -
    - return 0;
    + return PTR_ERR_OR_ZERO(i2s->field_fmt_sr);
    }

    static int sun4i_i2s_probe(struct platform_device *pdev)




    \
     
     \ /
      Last update: 2019-08-22 08:50    [W:4.139 / U:0.156 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site