diff --git a/cmd/gpio.c b/cmd/gpio.c
index 2b78b168663e05dde9e70d0a15696db11079c4ac..693998e8bd5d14822504aa5806c8f9ad0f7f1010 100644
--- a/cmd/gpio.c
+++ b/cmd/gpio.c
@@ -141,7 +141,7 @@ static int do_gpio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 #endif
 	if (argc > 0)
 		str_gpio = *argv;
-	if (!strncmp(str_cmd, "status", 1)) {
+	if (!strncmp(str_cmd, "status", 2)) {
 		/* Support deprecated gpio_status() */
 #ifdef gpio_status
 		gpio_status();