ASoC: amd: fix an IS_ERR() vs NULL bug in probe
The devm_ioremap() function returns NULL on error, it doesn't return
error pointers.
Fixes: e550339ee6
("ASoC: amd: add vangogh i2s controller driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20210727081756.GA19121@kili
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
89d751d8f9
commit
37108ef45a
|
@ -399,8 +399,8 @@ static int acp5x_dai_probe(struct platform_device *pdev)
|
|||
}
|
||||
adata->acp5x_base = devm_ioremap(&pdev->dev, res->start,
|
||||
resource_size(res));
|
||||
if (IS_ERR(adata->acp5x_base))
|
||||
return PTR_ERR(adata->acp5x_base);
|
||||
if (!adata->acp5x_base)
|
||||
return -ENOMEM;
|
||||
|
||||
adata->master_mode = I2S_MASTER_MODE_ENABLE;
|
||||
dev_set_drvdata(&pdev->dev, adata);
|
||||
|
|
Loading…
Reference in New Issue