summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/powernv/setup.c
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2020-02-17 05:48:32 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2020-03-04 14:44:27 +0300
commit16985f2d25095899685952296f128a71f0aff05c (patch)
tree7b9db801f45fb0af02b3ae87d2ff839c29c31326 /arch/powerpc/platforms/powernv/setup.c
parentd42c6d0f8d004c3661dde3c376ed637e9f292c22 (diff)
downloadlinux-16985f2d25095899685952296f128a71f0aff05c.tar.xz
powerpc/powernv: Treat an empty reboot string as default
Treat an empty reboot cmd string the same as a NULL string. This squashes a spurious unsupported reboot message that sometimes gets out when using xmon. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200217024833.30580-1-oohall@gmail.com
Diffstat (limited to 'arch/powerpc/platforms/powernv/setup.c')
-rw-r--r--arch/powerpc/platforms/powernv/setup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c
index 11fdae81b5dd..a8fe630cf7cc 100644
--- a/arch/powerpc/platforms/powernv/setup.c
+++ b/arch/powerpc/platforms/powernv/setup.c
@@ -229,7 +229,7 @@ static void __noreturn pnv_restart(char *cmd)
pnv_prepare_going_down();
do {
- if (!cmd)
+ if (!cmd || !strlen(cmd))
rc = opal_cec_reboot();
else if (strcmp(cmd, "full") == 0)
rc = opal_cec_reboot2(OPAL_REBOOT_FULL_IPL, NULL);