mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: codecs: Fix error handling in aw_dev_get_dsp_status function
@ 2024-10-09  7:39 Zhu Jun
  2024-10-09  8:43 ` [PATCH v2?] ASoC: codecs: aw88399: " Markus Elfring
  0 siblings, 1 reply; 3+ messages in thread
From: Zhu Jun @ 2024-10-09  7:39 UTC (permalink / raw)
  To: tiwai
  Cc: perex, wangweidong.a, andriy.shevchenko, heiko,
	kuninori.morimoto.gx, nathan, zhujun2, linux-sound, linux-kernel,
	lgirdwood, broonie

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	[flat|nested] 3+ messages in thread

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-09  7:39 [PATCH] ASoC: codecs: Fix error handling in aw_dev_get_dsp_status function Zhu Jun
2024-10-09  8:43 ` [PATCH v2?] ASoC: codecs: aw88399: " Markus Elfring
2024-10-09 10:40   ` 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®