kdumpctl: remove unnecessary uses of $?

Resolves: bz2232499
Upstream: Fedora Rawhide
Conflict: None

commit b49083126fcdd5be8cb7d84e0048ac2adddb6aed
Author: Philipp Rudo <prudo@redhat.com>
Date:   Fri Mar 25 15:47:00 2022 +0100

    kdumpctl: remove unnecessary uses of $?

    Signed-off-by: Philipp Rudo <prudo@redhat.com>
    Reviewed-by: Tao Liu <ltao@redhat.com>
    Reviewed-by: Coiby Xu <coxu@redhat.com>

Signed-off-by: Lichen Liu <lichliu@redhat.com>
This commit is contained in:
Lichen Liu 2023-09-21 14:29:28 +08:00
parent cb4e527a85
commit 64c0bfcc53
1 changed files with 2 additions and 14 deletions

View File

@ -125,7 +125,6 @@ rebuild_fadump_initrd()
check_earlykdump_is_enabled() check_earlykdump_is_enabled()
{ {
grep -q -w "rd.earlykdump" /proc/cmdline grep -q -w "rd.earlykdump" /proc/cmdline
return $?
} }
rebuild_kdump_initrd() rebuild_kdump_initrd()
@ -155,8 +154,6 @@ rebuild_initrd()
else else
rebuild_kdump_initrd rebuild_kdump_initrd
fi fi
return $?
} }
#$1: the files to be checked with IFS=' ' #$1: the files to be checked with IFS=' '
@ -626,7 +623,6 @@ check_rebuild()
dinfo "Rebuilding $TARGET_INITRD" dinfo "Rebuilding $TARGET_INITRD"
rebuild_initrd rebuild_initrd
return $?
} }
# On ppc64le LPARs, the keys trusted by firmware do not end up in # On ppc64le LPARs, the keys trusted by firmware do not end up in
@ -868,8 +864,6 @@ check_current_status()
else else
check_current_kdump_status check_current_kdump_status
fi fi
return $?
} }
save_raw() save_raw()
@ -998,7 +992,6 @@ check_dump_feasibility()
fi fi
check_kdump_feasibility check_kdump_feasibility
return $?
} }
start_fadump() start_fadump()
@ -1020,8 +1013,6 @@ start_dump()
else else
load_kdump load_kdump
fi fi
return $?
} }
check_failure_action_config() check_failure_action_config()
@ -1130,7 +1121,7 @@ reload()
if [[ $DEFAULT_DUMP_MODE == "fadump" ]]; then if [[ $DEFAULT_DUMP_MODE == "fadump" ]]; then
reload_fadump reload_fadump
return $? return
else else
if ! stop_kdump; then if ! stop_kdump; then
derror "Stopping kdump: [FAILED]" derror "Stopping kdump: [FAILED]"
@ -1194,7 +1185,7 @@ reload_fadump()
# to handle such scenario. # to handle such scenario.
if stop_fadump; then if stop_fadump; then
start_fadump start_fadump
return $? return
fi fi
fi fi
@ -1233,7 +1224,6 @@ rebuild()
dinfo "Rebuilding $TARGET_INITRD" dinfo "Rebuilding $TARGET_INITRD"
rebuild_initrd rebuild_initrd
return $?
} }
check_vmlinux() check_vmlinux()
@ -1907,5 +1897,3 @@ single_instance_lock
exec 9<&- exec 9<&-
main "$@" main "$@"
) )
exit $?