[PATCH] sound:aw88399:Correct error handling in aw_dev_get_dsp_status function

Zhu Jun posted 1 patch 1 month, 2 weeks ago
sound/soc/codecs/aw88399.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] sound:aw88399:Correct error handling in aw_dev_get_dsp_status function
Posted by Zhu Jun 1 month, 2 weeks ago
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
Re: [PATCH] sound:aw88399:Correct error handling in aw_dev_get_dsp_status function
Posted by Mark Brown 1 month, 2 weeks ago
On Mon, 07 Oct 2024 19:59:23 -0700, Zhu Jun wrote:
> Added proper error handling for register value check that
> return -EPERM when register value does not meet expected condition
> 
> 

Applied to

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

Thanks!

[1/1] sound:aw88399:Correct error handling in aw_dev_get_dsp_status function
      commit: 53189ae7aa1eeabd937c7a4d1f41e40513597d2c

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
Re: [PATCH] sound:aw88399:Correct error handling in aw_dev_get_dsp_status function
Posted by Mark Brown 1 month, 2 weeks ago
On Mon, Oct 07, 2024 at 07:59:23PM -0700, Zhu Jun wrote:
> Added proper error handling for register value check that
> return -EPERM when register value does not meet expected condition

Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.
Re: [PATCH] ASoC: codecs: aw88399: Correct error handling in aw_dev_get_dsp_status function
Posted by Markus Elfring 1 month, 2 weeks ago
* Please check the subsystem specification once more.

* How do you think about to replace the word “function” (in the summary phrase)
  by parentheses?


> Added proper error handling for register value check that

  Add?


> return -EPERM when register value does not meet expected condition

* It is usually preferred to end a sentence with a dot, isn't it?

* Would you like to add any tags (like “Fixes” and “Cc”) accordingly?


Regards,
Markus
Re: [PATCH] ASoC: codecs: aw88399: Correct error handling in aw_dev_get_dsp_status function
Posted by Mark Brown 1 month, 2 weeks ago
On Tue, Oct 08, 2024 at 08:32:32AM +0200, Markus Elfring wrote:
> * Please check the subsystem specification once more.
> 
> * How do you think about to replace the word “function” (in the summary phrase)
>   by parentheses?

Feel free to ignore Markus, he has a long history of sending
unhelpful review comments and continues to ignore repeated requests
to stop.