alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: qdsp6: Fix an IS_ERR() vs NULL bug
@ 2021-12-11  6:58 Miaoqian Lin
  2021-12-15  2:04 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Miaoqian Lin @ 2021-12-11  6:58 UTC (permalink / raw)
  Cc: Pierre-Louis Bossart, linmq006, Banajit Goswami, alsa-devel,
	linux-kernel, Takashi Iwai, Liam Girdwood, Mark Brown,
	Srinivas Kandagatla

The function gpr_alloc_port return ERR_PTR on errors, it doesn't return
null.

Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
 sound/soc/qcom/qdsp6/q6apm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/qcom/qdsp6/q6apm.c b/sound/soc/qcom/qdsp6/q6apm.c
index 13598ef5bacb..3e007d609a9b 100644
--- a/sound/soc/qcom/qdsp6/q6apm.c
+++ b/sound/soc/qcom/qdsp6/q6apm.c
@@ -630,9 +630,9 @@ struct q6apm_graph *q6apm_graph_open(struct device *dev, q6apm_cb cb,
 	init_waitqueue_head(&graph->cmd_wait);
 
 	graph->port = gpr_alloc_port(apm->gdev, dev, graph_callback, graph);
-	if (!graph->port) {
+	if (IS_ERR(graph->port)) {
 		kfree(graph);
-		ret = -ENOMEM;
+		ret = PTR_ERR(graph->port);
 		goto err;
 	}
 
-- 
2.17.1


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

* Re: [PATCH] ASoC: qdsp6: Fix an IS_ERR() vs NULL bug
  2021-12-11  6:58 [PATCH] ASoC: qdsp6: Fix an IS_ERR() vs NULL bug Miaoqian Lin
@ 2021-12-15  2:04 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-12-15  2:04 UTC (permalink / raw)
  To: Miaoqian Lin
  Cc: Pierre-Louis Bossart, alsa-devel, Banajit Goswami, Liam Girdwood,
	linux-kernel, Takashi Iwai, Srinivas Kandagatla

On Sat, 11 Dec 2021 06:58:29 +0000, Miaoqian Lin wrote:
> The function gpr_alloc_port return ERR_PTR on errors, it doesn't return
> null.
> 
> 

Applied to

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

Thanks!

[1/1] ASoC: qdsp6: Fix an IS_ERR() vs NULL bug
      commit: 59716aa3f9764144cdd558c64f04cb83001b71ac

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] 2+ messages in thread

end of thread, other threads:[~2021-12-15  2:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-11  6:58 [PATCH] ASoC: qdsp6: Fix an IS_ERR() vs NULL bug Miaoqian Lin
2021-12-15  2:04 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).