From: David Binder <david.bin...@unisys.com>

Initializes previously uninitialized variables that were flagged
as being problematic by Smatch.

Signed-off-by: David Binder <david.bin...@unisys.com>
Signed-off-by: David Kershner <david.kersh...@unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c 
b/drivers/staging/unisys/visorbus/visorchipset.c
index c1b872c..ce2a80e 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -512,7 +512,7 @@ static ssize_t toolaction_show(struct device *dev,
                               struct device_attribute *attr,
                               char *buf)
 {
-       u8 tool_action;
+       u8 tool_action = 0;
 
        visorchannel_read(controlvm_channel,
                          offsetof(struct spar_controlvm_channel_protocol,
@@ -580,7 +580,7 @@ static ssize_t boottotool_store(struct device *dev,
 static ssize_t error_show(struct device *dev, struct device_attribute *attr,
                          char *buf)
 {
-       u32 error;
+       u32 error = 0;
 
        visorchannel_read(controlvm_channel,
                          offsetof(struct spar_controlvm_channel_protocol,
@@ -611,7 +611,7 @@ static ssize_t error_store(struct device *dev, struct 
device_attribute *attr,
 static ssize_t textid_show(struct device *dev, struct device_attribute *attr,
                           char *buf)
 {
-       u32 text_id;
+       u32 text_id = 0;
 
        visorchannel_read
                (controlvm_channel,
@@ -643,7 +643,7 @@ static ssize_t textid_store(struct device *dev, struct 
device_attribute *attr,
 static ssize_t remaining_steps_show(struct device *dev,
                                    struct device_attribute *attr, char *buf)
 {
-       u16 remaining_steps;
+       u16 remaining_steps = 0;
 
        visorchannel_read(controlvm_channel,
                          offsetof(struct spar_controlvm_channel_protocol,
-- 
1.9.1

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to