Skip to content

Commit 251ce34

Browse files
Zhu Junbroonie
authored andcommitted
ASoC: codecs: Fix 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 <zhujun2@cmss.chinamobile.com> Link: https://patch.msgid.link/20241009073938.7472-1-zhujun2@cmss.chinamobile.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent d0e806b commit 251ce34

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/soc/codecs/aw88399.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ static int aw_dev_get_dsp_status(struct aw_device *aw_dev)
656656
if (ret)
657657
return ret;
658658
if (!(reg_val & (~AW88399_WDT_CNT_MASK)))
659-
ret = -EPERM;
659+
return -EPERM;
660660

661661
return 0;
662662
}

0 commit comments

Comments
 (0)