Commit 46b9b713 authored by Ivan Hu's avatar Ivan Hu Committed by Ingo Molnar

efi/efi_test: Fix uninitialized variable 'datasize'

Fix minor issue found by CoverityScan:

  CID 1358931 (#1 of 1): Uninitialized scalar variable (UNINIT)9.
  uninit_use: Using uninitialized value datasize.
  199        prev_datasize = datasize;
  200        status = efi.get_variable(name, vd, at, dz, data);
Signed-off-by: default avatarIvan Hu <ivan.hu@canonical.com>
Signed-off-by: default avatarMatt Fleming <matt@codeblueprint.co.uk>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20161018143318.15673-5-matt@codeblueprint.co.ukSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 0709a008
...@@ -155,7 +155,7 @@ static long efi_runtime_get_variable(unsigned long arg) ...@@ -155,7 +155,7 @@ static long efi_runtime_get_variable(unsigned long arg)
{ {
struct efi_getvariable __user *getvariable_user; struct efi_getvariable __user *getvariable_user;
struct efi_getvariable getvariable; struct efi_getvariable getvariable;
unsigned long datasize, prev_datasize, *dz; unsigned long datasize = 0, prev_datasize, *dz;
efi_guid_t vendor_guid, *vd = NULL; efi_guid_t vendor_guid, *vd = NULL;
efi_status_t status; efi_status_t status;
efi_char16_t *name = NULL; efi_char16_t *name = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment