util/msrtool: Exit program after displaying the help message

In case there is no mode selected, sys and cpu variables are not
initialized, causing a segfault on exit (goto done).

Change-Id: I4a183c267e306598627c1612f4633f1e19019f3c
Signed-off-by: Maciej Suminski <maciej.suminski@cern.ch>
Reviewed-on: https://review.coreboot.org/21026
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
This commit is contained in:
Maciej Suminski 2017-08-09 14:09:18 +02:00 committed by Nico Huber
parent d5fb99eab6
commit 3a44b6a34c
1 changed files with 1 additions and 1 deletions

View File

@ -417,7 +417,7 @@ int main(int argc, char *argv[]) {
if (optind == argc) {
syntax(argv);
printf("\nNo mode or address(es) specified!\n");
goto done;
return 1;
}
if (!found_system())