From: Zhu Jun Date: Tue, 8 Oct 2024 02:59:23 +0000 (-0700) Subject: ASoC: aw88399: Correct error handling in aw_dev_get_dsp_status function X-Git-Tag: v6.13-rc1~123^2~2^2~107 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=53189ae7aa1eeabd937c7a4d1f41e40513597d2c;p=thirdparty%2Fkernel%2Flinux.git ASoC: aw88399: Correct error handling in aw_dev_get_dsp_status function Added proper error handling for register value check that return -EPERM when register value does not meet expected condition Signed-off-by: Zhu Jun Link: https://patch.msgid.link/20241008025923.10606-1-zhujun2@cmss.chinamobile.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/aw88399.c b/sound/soc/codecs/aw88399.c index f3d4f13e6aedc..ee3cc2a95f85e 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; }