Skip to content

Commit ae626f6

Browse files
hcahcaVasily Gorbik
authored andcommitted
s390/mm,fault: replace WARN_ON_ONCE() with unreachable()
do_secure_storage_access() contains a switch statements which handles all possible return values from get_fault_type(). Therefore remove the pointless default case error handling and replace it with unreachable(). Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
1 parent 5c845de commit ae626f6

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

arch/s390/mm/fault.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,8 +618,7 @@ void do_secure_storage_access(struct pt_regs *regs)
618618
BUG();
619619
break;
620620
default:
621-
do_fault_error(regs, VM_FAULT_BADMAP);
622-
WARN_ON_ONCE(1);
621+
unreachable();
623622
}
624623
}
625624
NOKPROBE_SYMBOL(do_secure_storage_access);

0 commit comments

Comments
 (0)