Commit e782ddbb authored by Tang Bin's avatar Tang Bin Committed by Mark Brown

ASoC: hisilicon: Use IS_ERR() instead of IS_ERR_OR_NULL()

In the function hi6210_i2s_probe(), devm_clk_get() doesn't return NULL.
Thus use IS_ERR() to validate the return value instead of IS_ERR_OR_NULL().
Signed-off-by: default avatarZhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: default avatarTang Bin <tangbin@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20200427091145.4268-1-tangbin@cmss.chinamobile.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent b8d3ad51
......@@ -570,12 +570,12 @@ static int hi6210_i2s_probe(struct platform_device *pdev)
return PTR_ERR(i2s->sysctrl);
i2s->clk[CLK_DACODEC] = devm_clk_get(&pdev->dev, "dacodec");
if (IS_ERR_OR_NULL(i2s->clk[CLK_DACODEC]))
if (IS_ERR(i2s->clk[CLK_DACODEC]))
return PTR_ERR(i2s->clk[CLK_DACODEC]);
i2s->clocks++;
i2s->clk[CLK_I2S_BASE] = devm_clk_get(&pdev->dev, "i2s-base");
if (IS_ERR_OR_NULL(i2s->clk[CLK_I2S_BASE]))
if (IS_ERR(i2s->clk[CLK_I2S_BASE]))
return PTR_ERR(i2s->clk[CLK_I2S_BASE]);
i2s->clocks++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment