aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fail_function.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-01-07 18:51:39 +0100
committerTakashi Iwai <tiwai@suse.de>2021-01-07 18:51:39 +0100
commit7b62275507232f01f66d3e7d05c77bbd9009b726 (patch)
tree172dd8a7632877df2b623462bc871ab42e093bcc /kernel/fail_function.c
parentALSA: hda/realtek: fix right sounds and mute/micmute LEDs for HP machines (diff)
parentASoC: AMD Renoir - add DMI entry for Lenovo ThinkPad X395 (diff)
Merge tag 'asoc-fix-v5.11-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v5.11 A collection of mostly driver specific fixes, plus a maintainership update for TI and a fix for DAPM driver removal paths.
Diffstat (limited to 'kernel/fail_function.c')
-rw-r--r--kernel/fail_function.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/fail_function.c b/kernel/fail_function.c
index b0b1ad93fa95..60dc825ecc2b 100644
--- a/kernel/fail_function.c
+++ b/kernel/fail_function.c
@@ -37,9 +37,7 @@ static unsigned long adjust_error_retval(unsigned long addr, unsigned long retv)
{
switch (get_injectable_error_type(addr)) {
case EI_ETYPE_NULL:
- if (retv != 0)
- return 0;
- break;
+ return 0;
case EI_ETYPE_ERRNO:
if (retv < (unsigned long)-MAX_ERRNO)
return (unsigned long)-EINVAL;
@@ -48,6 +46,8 @@ static unsigned long adjust_error_retval(unsigned long addr, unsigned long retv)
if (retv != 0 && retv < (unsigned long)-MAX_ERRNO)
return (unsigned long)-EINVAL;
break;
+ case EI_ETYPE_TRUE:
+ return 1;
}
return retv;