Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934831AbcJROeY (ORCPT ); Tue, 18 Oct 2016 10:34:24 -0400 Received: from mail-lf0-f42.google.com ([209.85.215.42]:34028 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753944AbcJROd2 (ORCPT ); Tue, 18 Oct 2016 10:33:28 -0400 From: Matt Fleming To: Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" Cc: Ivan Hu , Ard Biesheuvel , linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, Matt Fleming , Ivan Khoronzhuk Subject: [PATCH 4/8] efi/efi_test: Fix the uninitialized value datasize Date: Tue, 18 Oct 2016 15:33:14 +0100 Message-Id: <20161018143318.15673-5-matt@codeblueprint.co.uk> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20161018143318.15673-1-matt@codeblueprint.co.uk> References: <20161018143318.15673-1-matt@codeblueprint.co.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1168 Lines: 31 From: Ivan Hu Fix the 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: Ivan Hu Cc: Ivan Khoronzhuk Cc: Ard Biesheuvel Signed-off-by: Matt Fleming --- 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 ae51268737cc..348efc9cf59f 100644 --- a/drivers/firmware/efi/test/efi_test.c +++ b/drivers/firmware/efi/test/efi_test.c @@ -155,7 +155,7 @@ static long efi_runtime_get_variable(unsigned long arg) { struct efi_getvariable __user *getvariable_user; 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_status_t status; efi_char16_t *name = NULL; -- 2.10.0