* [PATCH next] ASoC: SDCA: Fix NULL vs IS_ERR() bug in sdca_dev_register_functions()
@ 2025-11-25 13:55 Dan Carpenter
2025-11-25 14:03 ` Charles Keepax
2025-11-25 20:04 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2025-11-25 13:55 UTC (permalink / raw)
To: Pierre-Louis Bossart
Cc: Charles Keepax, Maciej Strozek, Bard Liao, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, Peter Ujfalusi,
Vinod Koul, linux-sound, patches, linux-kernel, kernel-janitors
The sdca_dev_register() function never returns NULL, it returns error
pointers on error. Fix the error checking to match.
Fixes: 4496d1c65bad ("ASoC: SDCA: add function devices")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
sound/soc/sdca/sdca_function_device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/sdca/sdca_function_device.c b/sound/soc/sdca/sdca_function_device.c
index 91c49d7389db..c6cc880a150e 100644
--- a/sound/soc/sdca/sdca_function_device.c
+++ b/sound/soc/sdca/sdca_function_device.c
@@ -96,8 +96,8 @@ int sdca_dev_register_functions(struct sdw_slave *slave)
func_dev = sdca_dev_register(&slave->dev,
&sdca_data->function[i]);
- if (!func_dev)
- return -ENODEV;
+ if (IS_ERR(func_dev))
+ return PTR_ERR(func_dev);
sdca_data->function[i].func_dev = func_dev;
}
--
2.51.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH next] ASoC: SDCA: Fix NULL vs IS_ERR() bug in sdca_dev_register_functions()
2025-11-25 13:55 [PATCH next] ASoC: SDCA: Fix NULL vs IS_ERR() bug in sdca_dev_register_functions() Dan Carpenter
@ 2025-11-25 14:03 ` Charles Keepax
2025-11-25 20:04 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2025-11-25 14:03 UTC (permalink / raw)
To: Dan Carpenter
Cc: Pierre-Louis Bossart, Maciej Strozek, Bard Liao, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, Peter Ujfalusi,
Vinod Koul, linux-sound, patches, linux-kernel, kernel-janitors
On Tue, Nov 25, 2025 at 04:55:28PM +0300, Dan Carpenter wrote:
> The sdca_dev_register() function never returns NULL, it returns error
> pointers on error. Fix the error checking to match.
>
> Fixes: 4496d1c65bad ("ASoC: SDCA: add function devices")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH next] ASoC: SDCA: Fix NULL vs IS_ERR() bug in sdca_dev_register_functions()
2025-11-25 13:55 [PATCH next] ASoC: SDCA: Fix NULL vs IS_ERR() bug in sdca_dev_register_functions() Dan Carpenter
2025-11-25 14:03 ` Charles Keepax
@ 2025-11-25 20:04 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2025-11-25 20:04 UTC (permalink / raw)
To: Pierre-Louis Bossart, Dan Carpenter
Cc: Charles Keepax, Maciej Strozek, Bard Liao, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, Peter Ujfalusi, Vinod Koul,
linux-sound, patches, linux-kernel, kernel-janitors
On Tue, 25 Nov 2025 16:55:28 +0300, Dan Carpenter wrote:
> The sdca_dev_register() function never returns NULL, it returns error
> pointers on error. Fix the error checking to match.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: SDCA: Fix NULL vs IS_ERR() bug in sdca_dev_register_functions()
commit: 80339b3823bb76d383c82186b55ac836fed3f586
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] 3+ messages in thread
end of thread, other threads:[~2025-11-25 20:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-25 13:55 [PATCH next] ASoC: SDCA: Fix NULL vs IS_ERR() bug in sdca_dev_register_functions() Dan Carpenter
2025-11-25 14:03 ` Charles Keepax
2025-11-25 20: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