All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: amd: fix an IS_ERR() vs NULL bug in probe
@ 2021-07-27  8:17 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2021-07-27  8:17 UTC (permalink / raw)
  To: Liam Girdwood, Vijendar Mukunda
  Cc: Mark Brown, Jaroslav Kysela, Takashi Iwai, Pierre-Louis Bossart,
	alsa-devel, kernel-janitors

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 <dan.carpenter@oracle.com>
---
 sound/soc/amd/vangogh/acp5x-i2s.c | 4 ++--
 1 file 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);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ASoC: amd: fix an IS_ERR() vs NULL bug in probe
@ 2021-07-27  8:17 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2021-07-27  8:17 UTC (permalink / raw)
  To: Liam Girdwood, Vijendar Mukunda
  Cc: alsa-devel, kernel-janitors, Pierre-Louis Bossart, Takashi Iwai,
	Mark Brown

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 <dan.carpenter@oracle.com>
---
 sound/soc/amd/vangogh/acp5x-i2s.c | 4 ++--
 1 file 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);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: amd: fix an IS_ERR() vs NULL bug in probe
  2021-07-27  8:17 ` Dan Carpenter
@ 2021-07-27 15:46   ` Mark Brown
  -1 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2021-07-27 15:46 UTC (permalink / raw)
  To: Liam Girdwood, Dan Carpenter, Vijendar Mukunda
  Cc: Mark Brown, alsa-devel, Jaroslav Kysela, Takashi Iwai,
	kernel-janitors, Pierre-Louis Bossart

On Tue, 27 Jul 2021 11:17:56 +0300, Dan Carpenter wrote:
> The devm_ioremap() function returns NULL on error, it doesn't return
> error pointers.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: amd: fix an IS_ERR() vs NULL bug in probe
      commit: 37108ef45ae9021d23174ce89e76ad41443090bf

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: amd: fix an IS_ERR() vs NULL bug in probe
@ 2021-07-27 15:46   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2021-07-27 15:46 UTC (permalink / raw)
  To: Liam Girdwood, Dan Carpenter, Vijendar Mukunda
  Cc: alsa-devel, kernel-janitors, Pierre-Louis Bossart, Takashi Iwai,
	Mark Brown

On Tue, 27 Jul 2021 11:17:56 +0300, Dan Carpenter wrote:
> The devm_ioremap() function returns NULL on error, it doesn't return
> error pointers.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: amd: fix an IS_ERR() vs NULL bug in probe
      commit: 37108ef45ae9021d23174ce89e76ad41443090bf

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-27 15:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27  8:17 [PATCH] ASoC: amd: fix an IS_ERR() vs NULL bug in probe Dan Carpenter
2021-07-27  8:17 ` Dan Carpenter
2021-07-27 15:46 ` Mark Brown
2021-07-27 15:46   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.