git » linux-kernel » commit ae6b662

Initialize some variables

author Alberto Bertogli
2009-12-06 04:44:39 UTC
committer Alberto Bertogli
2010-05-24 23:37:03 UTC
parent 9a7625c833f4be3a2bc20490cca57c76e8d0f2e8

Initialize some variables

These variables can theoretically be used without being initialized. In
practice this shouldn't happen, but gcc can't know about that, so it
emits a warning.

This patch initializes them to sensible values.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

crypto/testmgr.c +1 -0
drivers/acpi/acpi_pad.c +1 -1

diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 5c8aaa0cb0b..19b34969603 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -1240,6 +1240,7 @@ static int test_cprng(struct crypto_rng *tfm, struct cprng_testvec *template,
 		return -ENOMEM;
 	}
 
+	err = -EINVAL;
 	for (i = 0; i < tcount; i++) {
 		memset(result, 0, 32);
 
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c
index 62122134693..8e2026fabbd 100644
--- a/drivers/acpi/acpi_pad.c
+++ b/drivers/acpi/acpi_pad.c
@@ -417,7 +417,7 @@ static void acpi_pad_ost(acpi_handle handle, int stat,
 
 static void acpi_pad_handle_notify(acpi_handle handle)
 {
-	int num_cpus;
+	int num_cpus = 0;
 	uint32_t idle_cpus;
 
 	mutex_lock(&isolated_cpus_lock);