diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 19e200d9112091fc3ddfe5aac59f94b32b38c4dc..86cd1ea355792148dcda2d48f9554ca7edeb99f2 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -830,6 +830,7 @@ static int handle_exit(void)
 		fprintf(stderr, _("\n\n"
 				  "Your configuration changes were NOT saved."
 				  "\n\n"));
+		res = 0;
 	}
 
 	return res;