Skip to contentSkip to conversation

sound: cs43130: fix a NULL pointer dereference

PATCH In review Kangjie Lu 2 participants 4 messages Mar 15, 2019 – May 2, 2019

Subsystems (3)
lore
Share & tools
lore

Kangjie Lu

author
#0 lore raw

PATCH 1/1 sound: cs43130: fix a NULL pointer dereference

In case create_singlethread_workqueue fails, the fix returns -ENOMEM to avoid potential NULL pointer dereference.

---
 sound/soc/codecs/cs43130.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/codecs/cs43130.c +2 -0
index 3f7b255587e6..80d672710eae 100644
@@ -2322,6 +2322,8 @@ static int cs43130_probe(struct snd_soc_component *component)
 			return ret;
 
 		cs43130->wq = create_singlethread_workqueue("cs43130_hp");
+		if (!cs43130->wq)
+			return -ENOMEM;
 		INIT_WORK(&cs43130->work, cs43130_imp_meas);
 	}
 
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 2 lines · Kangjie Lu

In case create_singlethread_workqueue fails, the fix returns -ENOMEM to avoid potential NULL pointer dereference.

Please use subject lines matching the style for the subsystem. This makes it easier for people to identify relevant patches.

maintainer
#2 lore raw

Applied "ASoC: cs43130: fix a NULL pointer dereference" to the asoc tree

In reply to Kangjie Lu

The patch

ASoC: cs43130: fix a NULL pointer dereference

has been applied to the asoc tree at

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

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

Quoted 1 line

From 51e3724aec01d30852f61d924ad01ce3ea782a0f Mon Sep 17 00:00:00 2001

From: Kangjie Lu <[email protected]>
Date: Thu, 14 Mar 2019 22:51:20 -0500
Subject: [PATCH] ASoC: cs43130: fix a NULL pointer dereference

In case create_singlethread_workqueue fails, the fix returns -ENOMEM to avoid potential NULL pointer dereference.

---
 sound/soc/codecs/cs43130.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/codecs/cs43130.c +2 -0
index 3f7b255587e6..80d672710eae 100644
@@ -2322,6 +2322,8 @@ static int cs43130_probe(struct snd_soc_component *component)
 			return ret;
 
 		cs43130->wq = create_singlethread_workqueue("cs43130_hp");
+		if (!cs43130->wq)
+			return -ENOMEM;
 		INIT_WORK(&cs43130->work, cs43130_imp_meas);
 	}
 
Signature · 1 line
2.20.1
maintainer
#3 lore raw

Applied "ASoC: cs43130: fix a NULL pointer dereference" to the asoc tree

In reply to Kangjie Lu

The patch

ASoC: cs43130: fix a NULL pointer dereference

has been applied to the asoc tree at

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

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

Quoted 1 line

From a2be42f18d409213bb7e7a736e3ef6ba005115bb Mon Sep 17 00:00:00 2001

From: Kangjie Lu <[email protected]>
Date: Thu, 14 Mar 2019 22:51:20 -0500
Subject: [PATCH] ASoC: cs43130: fix a NULL pointer dereference

In case create_singlethread_workqueue fails, the fix returns -ENOMEM to avoid potential NULL pointer dereference.

---
 sound/soc/codecs/cs43130.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/codecs/cs43130.c +2 -0
index 3f7b255587e6..80d672710eae 100644
@@ -2322,6 +2322,8 @@ static int cs43130_probe(struct snd_soc_component *component)
 			return ret;
 
 		cs43130->wq = create_singlethread_workqueue("cs43130_hp");
+		if (!cs43130->wq)
+			return -ENOMEM;
 		INIT_WORK(&cs43130->work, cs43130_imp_meas);
 	}
 
Signature · 1 line
2.20.1