Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] sound:aw88399:Correct error handling in aw_dev_get_dsp_status function
@ 2024-10-08  2:59 Zhu Jun
  2024-10-08  6:32 ` [PATCH] ASoC: codecs: aw88399: Correct " Markus Elfring
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Zhu Jun @ 2024-10-08  2:59 UTC (permalink / raw)
  To: perex
  Cc: tiwai, wangweidong.a, andriy.shevchenko, heiko,
	kuninori.morimoto.gx, nathan, u.kleine-koenig, zhujun2,
	linux-kernel, linux-sound, broonie, lgirdwood

Added proper error handling for register value check that
return -EPERM when register value does not meet expected condition

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
---
 sound/soc/codecs/aw88399.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/aw88399.c b/sound/soc/codecs/aw88399.c
index 8dc2b8aa6832..bba59885242d 100644
--- a/sound/soc/codecs/aw88399.c
+++ b/sound/soc/codecs/aw88399.c
@@ -656,7 +656,7 @@ static int aw_dev_get_dsp_status(struct aw_device *aw_dev)
 	if (ret)
 		return ret;
 	if (!(reg_val & (~AW88399_WDT_CNT_MASK)))
-		ret = -EPERM;
+		return -EPERM;
 
 	return 0;
 }
-- 
2.17.1




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

end of thread, other threads:[~2024-10-10 11:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-08  2:59 [PATCH] sound:aw88399:Correct error handling in aw_dev_get_dsp_status function Zhu Jun
2024-10-08  6:32 ` [PATCH] ASoC: codecs: aw88399: Correct " Markus Elfring
2024-10-08  9:49   ` Mark Brown
2024-10-08  9:48 ` [PATCH] sound:aw88399:Correct " Mark Brown
2024-10-10 11:14 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox