summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorMaciej Suminski <maciej.suminski@cern.ch>2017-08-09 14:09:18 +0200
committerNico Huber <nico.h@gmx.de>2017-08-22 10:10:49 +0000
commit3a44b6a34c56005cd4e15d6f50bf3e85ffee2570 (patch)
tree7da948f8f3cfd698acbb018c05d3832aa9b2fde4 /util
parentd5fb99eab679a5b66b64665575ff40b84d01c3b9 (diff)
downloadcoreboot-3a44b6a34c56005cd4e15d6f50bf3e85ffee2570.tar.xz
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>
Diffstat (limited to 'util')
-rw-r--r--util/msrtool/msrtool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/msrtool/msrtool.c b/util/msrtool/msrtool.c
index 4060ba3198..9be83f4129 100644
--- a/util/msrtool/msrtool.c
+++ b/util/msrtool/msrtool.c
@@ -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())