* [PATCH] ASoc: uniphier: Handle regmap_write errors in aio_iecout_set_enable()
@ 2024-10-08 5:20 (학생) 장인규 (컴퓨터공학과)
2024-10-23 11:51 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: (학생) 장인규 (컴퓨터공학과) @ 2024-10-08 5:20 UTC (permalink / raw)
To: perex, tiwai, hayashi.kunihiko, mhiramat
Cc: lgirdwood, broonie, linux-sound, linux-arm-kernel, linux-kernel
From ae50796beac447467e6ecfa09bf40ac02b914e40 Mon Sep 17 00:00:00 2001
From: Ingyu Jang <ingyujang25@unist.ac.kr>
Date: Tue, 8 Oct 2024 14:11:11 +0900
Subject: [PATCH] ASoc: uniphier: Handle regmap_write errors in
aio_iecout_set_enable()
The aio_oport_set_stream_type() function did not previously check the
return values of regmap_write().
If these functions fail, it could lead to silent failures when
configuring the audio playback port, causing improper behavior in audio
stream output via S/PDIF without any indication of an error.
This patch modifies aio_oport_set_stream_type() to check the return
values of regmap_write().
If regmap_write() fails, the error code is propagated back to the caller
to ensure proper error handling.
Signed-off-by: Ingyu Jang <ingyujang25@unist.ac.kr>
---
sound/soc/uniphier/aio-core.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/sound/soc/uniphier/aio-core.c b/sound/soc/uniphier/aio-core.c
index 0eba60758134..d334a5a08271 100644
--- a/sound/soc/uniphier/aio-core.c
+++ b/sound/soc/uniphier/aio-core.c
@@ -838,6 +838,7 @@ int aio_oport_set_stream_type(struct uniphier_aio_sub *sub,
{
struct regmap *r = sub->aio->chip->regmap;
u32 repet = 0, pause = OPORTMXPAUDAT_PAUSEPC_CMN;
+ int ret;
switch (pc) {
case IEC61937_PC_AC3:
@@ -880,8 +881,13 @@ int aio_oport_set_stream_type(struct uniphier_aio_sub *sub,
break;
}
- regmap_write(r, OPORTMXREPET(sub->swm->oport.map), repet);
- regmap_write(r, OPORTMXPAUDAT(sub->swm->oport.map), pause);
+ ret = regmap_write(r, OPORTMXREPET(sub->swm->oport.map), repet);
+ if (ret)
+ return ret;
+
+ ret = regmap_write(r, OPORTMXPAUDAT(sub->swm->oport.map), pause);
+ if (ret)
+ return ret;
return 0;
}
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] ASoc: uniphier: Handle regmap_write errors in aio_iecout_set_enable()
2024-10-08 5:20 [PATCH] ASoc: uniphier: Handle regmap_write errors in aio_iecout_set_enable() (학생) 장인규 (컴퓨터공학과)
@ 2024-10-23 11:51 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2024-10-23 11:51 UTC (permalink / raw)
To: perex, tiwai, hayashi.kunihiko, mhiramat,
(학생) 장인규
(컴퓨터공학과)
Cc: lgirdwood, linux-sound, linux-arm-kernel, linux-kernel
On Tue, 08 Oct 2024 05:20:30 +0000, (학생) 장인규 (컴퓨터공학과) wrote:
> The aio_oport_set_stream_type() function did not previously check the
> return values of regmap_write().
> If these functions fail, it could lead to silent failures when
> configuring the audio playback port, causing improper behavior in audio
> stream output via S/PDIF without any indication of an error.
>
> This patch modifies aio_oport_set_stream_type() to check the return
> values of regmap_write().
> If regmap_write() fails, the error code is propagated back to the caller
> to ensure proper error handling.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoc: uniphier: Handle regmap_write errors in aio_iecout_set_enable()
commit: 9b0c65115acdcb6fd6bbeb360c1f4f7b14c9a610
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:[~2024-10-23 11:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-08 5:20 [PATCH] ASoc: uniphier: Handle regmap_write errors in aio_iecout_set_enable() (학생) 장인규 (컴퓨터공학과)
2024-10-23 11:51 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®