From: Ivan Hu Date: Tue, 18 Oct 2016 14:33:15 +0000 (+0100) Subject: efi/efi_test: Fix uninitialized variable 'rv' X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9c30a2199311df9a1f25d0586c96dfbb7e876cdf;p=linux-beck.git efi/efi_test: Fix uninitialized variable 'rv' Fix minor issue found by CoverityScan: 520 kfree(name); CID 1358932 (#1 of 1): Uninitialized scalar variable (UNINIT)17. uninit_use: Using uninitialized value rv. 521 return rv; 522} Signed-off-by: Ivan Hu Signed-off-by: Matt Fleming Cc: Ard Biesheuvel Cc: Ivan Khoronzhuk Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20161018143318.15673-6-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar --- diff --git a/drivers/firmware/efi/test/efi_test.c b/drivers/firmware/efi/test/efi_test.c index 348efc9cf59f..bb26e12b0cfd 100644 --- a/drivers/firmware/efi/test/efi_test.c +++ b/drivers/firmware/efi/test/efi_test.c @@ -428,7 +428,7 @@ static long efi_runtime_get_nextvariablename(unsigned long arg) efi_guid_t *vd = NULL; efi_guid_t vendor_guid; efi_char16_t *name = NULL; - int rv; + int rv = 0; getnextvariablename_user = (struct efi_getnextvariablename __user *)arg;