Skip to content

Commit

Permalink
selftests, x86, protection_keys: fix uninitialized variable warning
Browse files Browse the repository at this point in the history
'orig_pkru' might have been uninitialized here.  Fix it.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
  • Loading branch information
Dave Hansen authored and Shuah Khan committed Feb 8, 2017
1 parent 0a7d2cd commit 16846c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/x86/protection_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ void pkey_disable_set(int pkey, int flags)
unsigned long syscall_flags = 0;
int ret;
int pkey_rights;
u32 orig_pkru;
u32 orig_pkru = rdpkru();

dprintf1("START->%s(%d, 0x%x)\n", __func__,
pkey, flags);
Expand Down

0 comments on commit 16846c2

Please sign in to comment.