[tip:efi/core] efi/efi_test: Fix uninitialized variable 'rv'
From: tip-bot for Ivan Hu
Date: Tue Oct 18 2016 - 11:31:31 EST
Commit-ID: 9c30a2199311df9a1f25d0586c96dfbb7e876cdf
Gitweb: http://git.kernel.org/tip/9c30a2199311df9a1f25d0586c96dfbb7e876cdf
Author: Ivan Hu <ivan.hu@xxxxxxxxxxxxx>
AuthorDate: Tue, 18 Oct 2016 15:33:15 +0100
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitDate: Tue, 18 Oct 2016 17:11:18 +0200
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 <ivan.hu@xxxxxxxxxxxxx>
Signed-off-by: Matt Fleming <matt@xxxxxxxxxxxxxxxxxxx>
Cc: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>
Cc: Ivan Khoronzhuk <ivan.khoronzhuk@xxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: linux-efi@xxxxxxxxxxxxxxx
Link: http://lkml.kernel.org/r/20161018143318.15673-6-matt@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
drivers/firmware/efi/test/efi_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/efi/test/efi_test.c b/drivers/firmware/efi/test/efi_test.c
index 348efc9..bb26e12 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;