* [PATCH] ASoC: SOF: imx8: Fix an is IS_ERR() vs NULL check
@ 2019-08-26 13:18 ` Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2019-08-26 13:18 UTC (permalink / raw)
To: Liam Girdwood, Daniel Baluta
Cc: Pierre-Louis Bossart, alsa-devel, Fabio Estevam, Sascha Hauer,
kernel-janitors, Takashi Iwai, Mark Brown, NXP Linux Team,
Pengutronix Kernel Team, Shawn Guo
The device_link_add() function only returns NULL on error, it doesn't
return error pointers.
Fixes: 202acc565a1f ("ASoC: SOF: imx: Add i.MX8 HW support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
sound/soc/sof/imx/imx8.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c
index e502f584207f..41ad3a310808 100644
--- a/sound/soc/sof/imx/imx8.c
+++ b/sound/soc/sof/imx/imx8.c
@@ -227,8 +227,8 @@ static int imx8_probe(struct snd_sof_dev *sdev)
DL_FLAG_STATELESS |
DL_FLAG_PM_RUNTIME |
DL_FLAG_RPM_ACTIVE);
- if (IS_ERR(priv->link[i])) {
- ret = PTR_ERR(priv->link[i]);
+ if (!priv->link[i]) {
+ ret = -ENOMEM;
dev_pm_domain_detach(priv->pd_dev[i], false);
goto exit_unroll_pm;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] ASoC: SOF: imx8: Fix an is IS_ERR() vs NULL check
2019-08-26 13:18 ` Dan Carpenter
@ 2019-08-26 13:23 ` Daniel Baluta
-1 siblings, 0 replies; 6+ messages in thread
From: Daniel Baluta @ 2019-08-26 13:23 UTC (permalink / raw)
To: lgirdwood@gmail.com, dan.carpenter@oracle.com
Cc: alsa-devel@alsa-project.org, shawnguo@kernel.org,
s.hauer@pengutronix.de, kernel-janitors@vger.kernel.org,
tiwai@suse.com, pierre-louis.bossart@linux.intel.com,
broonie@kernel.org, dl-linux-imx, kernel@pengutronix.de,
festevam@gmail.com
On Mon, 2019-08-26 at 16:18 +0300, Dan Carpenter wrote:
> The device_link_add() function only returns NULL on error, it doesn't
> return error pointers.
>
> Fixes: 202acc565a1f ("ASoC: SOF: imx: Add i.MX8 HW support")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks Dan! Nice catch.
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
> ---
> sound/soc/sof/imx/imx8.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c
> index e502f584207f..41ad3a310808 100644
> --- a/sound/soc/sof/imx/imx8.c
> +++ b/sound/soc/sof/imx/imx8.c
> @@ -227,8 +227,8 @@ static int imx8_probe(struct snd_sof_dev *sdev)
> DL_FLAG_STATELESS |
> DL_FLAG_PM_RUNTIME |
> DL_FLAG_RPM_ACTIVE);
> - if (IS_ERR(priv->link[i])) {
> - ret = PTR_ERR(priv->link[i]);
> + if (!priv->link[i]) {
> + ret = -ENOMEM;
> dev_pm_domain_detach(priv->pd_dev[i], false);
> goto exit_unroll_pm;
> }
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] ASoC: SOF: imx8: Fix an is IS_ERR() vs NULL check
@ 2019-08-26 13:23 ` Daniel Baluta
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Baluta @ 2019-08-26 13:23 UTC (permalink / raw)
To: lgirdwood@gmail.com, dan.carpenter@oracle.com
Cc: alsa-devel@alsa-project.org, shawnguo@kernel.org,
s.hauer@pengutronix.de, kernel-janitors@vger.kernel.org,
tiwai@suse.com, pierre-louis.bossart@linux.intel.com,
broonie@kernel.org, dl-linux-imx, kernel@pengutronix.de,
festevam@gmail.com
T24gTW9uLCAyMDE5LTA4LTI2IGF0IDE2OjE4ICswMzAwLCBEYW4gQ2FycGVudGVyIHdyb3RlOg0K
PiBUaGUgZGV2aWNlX2xpbmtfYWRkK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pdi0+bGlua1tpXSk7DQo+ICsJCWlmICghcHJpdi0+bGlua1tpXSkgew0KPiAr
CQkJcmV0ID0gLUVOT01FTTsNCj4gIAkJCWRldl9wbV9kb21haW5fZGV0YWNoKHByaXYtPnBkX2Rl
dltpXSwgZmFsc2UpOw0KPiAgCQkJZ290byBleGl0X3Vucm9sbF9wbTsNCj4gIAkJfQ0K
^ permalink raw reply [flat|nested] 6+ messages in thread
* Applied "ASoC: SOF: imx8: Fix an is IS_ERR() vs NULL check" to the asoc tree
2019-08-26 13:18 ` Dan Carpenter
@ 2019-08-27 19:58 ` Mark Brown
-1 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2019-08-27 19:58 UTC (permalink / raw)
To: Dan Carpenter
Cc: Pierre-Louis Bossart, alsa-devel, Daniel Baluta, Sascha Hauer,
Takashi Iwai, kernel-janitors, Liam Girdwood, Mark Brown,
NXP Linux Team, Pengutronix Kernel Team, Shawn Guo, Fabio Estevam
The patch
ASoC: SOF: imx8: Fix an is IS_ERR() vs NULL check
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
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
>From a325c7bc3a92f1d5ba8cff10d7ab93a989cdeb80 Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Mon, 26 Aug 2019 16:18:55 +0300
Subject: [PATCH] ASoC: SOF: imx8: Fix an is IS_ERR() vs NULL check
The device_link_add() function only returns NULL on error, it doesn't
return error pointers.
Fixes: 202acc565a1f ("ASoC: SOF: imx: Add i.MX8 HW support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20190826131855.GA6840@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/sof/imx/imx8.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c
index c9d849ced54a..2a22b18e5ec0 100644
--- a/sound/soc/sof/imx/imx8.c
+++ b/sound/soc/sof/imx/imx8.c
@@ -227,8 +227,8 @@ static int imx8_probe(struct snd_sof_dev *sdev)
DL_FLAG_STATELESS |
DL_FLAG_PM_RUNTIME |
DL_FLAG_RPM_ACTIVE);
- if (IS_ERR(priv->link[i])) {
- ret = PTR_ERR(priv->link[i]);
+ if (!priv->link[i]) {
+ ret = -ENOMEM;
dev_pm_domain_detach(priv->pd_dev[i], false);
goto exit_unroll_pm;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Applied "ASoC: SOF: imx8: Fix an is IS_ERR() vs NULL check" to the asoc tree
@ 2019-08-27 19:58 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2019-08-27 19:58 UTC (permalink / raw)
To: Dan Carpenter
Cc: Pierre-Louis Bossart, alsa-devel, Daniel Baluta, Sascha Hauer,
Takashi Iwai, kernel-janitors, Liam Girdwood, Mark Brown,
NXP Linux Team, Pengutronix Kernel Team, Shawn Guo, Fabio Estevam
The patch
ASoC: SOF: imx8: Fix an is IS_ERR() vs NULL check
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
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
From a325c7bc3a92f1d5ba8cff10d7ab93a989cdeb80 Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Mon, 26 Aug 2019 16:18:55 +0300
Subject: [PATCH] ASoC: SOF: imx8: Fix an is IS_ERR() vs NULL check
The device_link_add() function only returns NULL on error, it doesn't
return error pointers.
Fixes: 202acc565a1f ("ASoC: SOF: imx: Add i.MX8 HW support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20190826131855.GA6840@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/sof/imx/imx8.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c
index c9d849ced54a..2a22b18e5ec0 100644
--- a/sound/soc/sof/imx/imx8.c
+++ b/sound/soc/sof/imx/imx8.c
@@ -227,8 +227,8 @@ static int imx8_probe(struct snd_sof_dev *sdev)
DL_FLAG_STATELESS |
DL_FLAG_PM_RUNTIME |
DL_FLAG_RPM_ACTIVE);
- if (IS_ERR(priv->link[i])) {
- ret = PTR_ERR(priv->link[i]);
+ if (!priv->link[i]) {
+ ret = -ENOMEM;
dev_pm_domain_detach(priv->pd_dev[i], false);
goto exit_unroll_pm;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread