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>
This commit is contained in:
Philipp Rudo 2022-03-25 15:47:00 +01:00 committed by Coiby Xu
parent aa9bb8f8ce
commit b49083126f

View File

@ -86,7 +86,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()
@ -117,8 +116,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=' '
@ -584,7 +581,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
@ -815,8 +811,6 @@ check_current_status()
else else
check_current_kdump_status check_current_kdump_status
fi fi
return $?
} }
save_raw() save_raw()
@ -945,7 +939,6 @@ check_dump_feasibility()
fi fi
check_kdump_feasibility check_kdump_feasibility
return $?
} }
start_fadump() start_fadump()
@ -967,8 +960,6 @@ start_dump()
else else
load_kdump load_kdump
fi fi
return $?
} }
check_failure_action_config() check_failure_action_config()
@ -1077,7 +1068,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]"
@ -1141,7 +1132,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
@ -1180,7 +1171,6 @@ rebuild()
dinfo "Rebuilding $TARGET_INITRD" dinfo "Rebuilding $TARGET_INITRD"
rebuild_initrd rebuild_initrd
return $?
} }
do_estimate() do_estimate()
@ -1787,5 +1777,3 @@ single_instance_lock
exec 9<&- exec 9<&-
main "$@" main "$@"
) )
exit $?