diff mbox series

sound:aw88399:Correct error handling in aw_dev_get_dsp_status function

Message ID 20241008025923.10606-1-zhujun2@cmss.chinamobile.com (mailing list archive)
State Accepted
Commit 53189ae7aa1eeabd937c7a4d1f41e40513597d2c
Headers show
Series sound:aw88399:Correct error handling in aw_dev_get_dsp_status function | expand

Commit Message

Zhu Jun Oct. 8, 2024, 2:59 a.m. UTC
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(-)

Comments

Markus Elfring Oct. 8, 2024, 6:32 a.m. UTC | #1
* 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
Mark Brown Oct. 8, 2024, 9:48 a.m. UTC | #2
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.
Mark Brown Oct. 8, 2024, 9:49 a.m. UTC | #3
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.
Mark Brown Oct. 10, 2024, 11:14 a.m. UTC | #4
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
diff mbox series

Patch

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;
 }