diff options
| author | Dan Carpenter <[email protected]> | 2021-07-27 08:17:56 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2021-07-27 12:14:53 +0000 |
| commit | 37108ef45ae9021d23174ce89e76ad41443090bf (patch) | |
| tree | 864ba618278857ee1ea405372df85f259703eed7 | |
| parent | ASoC: rt5682: enable SAR ADC power saving mode during suspend (diff) | |
| download | kernel-37108ef45ae9021d23174ce89e76ad41443090bf.tar.gz kernel-37108ef45ae9021d23174ce89e76ad41443090bf.zip | |
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: e550339ee652 ("ASoC: amd: add vangogh i2s controller driver")
Signed-off-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/20210727081756.GA19121@kili
Signed-off-by: Mark Brown <[email protected]>
| -rw-r--r-- | sound/soc/amd/vangogh/acp5x-i2s.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/amd/vangogh/acp5x-i2s.c b/sound/soc/amd/vangogh/acp5x-i2s.c index 86b37c93c3d2..2705e57eb713 100644 --- a/sound/soc/amd/vangogh/acp5x-i2s.c +++ b/sound/soc/amd/vangogh/acp5x-i2s.c @@ -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); |
