staging: unisys: visorbus: initialize variables
authorDavid Binder <[email protected]>
Tue, 19 Apr 2016 03:40:09 +0000 (23:40 -0400)
committerGreg Kroah-Hartman <[email protected]>
Fri, 29 Apr 2016 05:10:27 +0000 (22:10 -0700)
Initializes previously uninitialized variables that were flagged
as being problematic by Smatch.

Signed-off-by: David Binder <[email protected]>
Signed-off-by: David Kershner <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/staging/unisys/visorbus/visorchipset.c

index d7ec463a64b02aaa7ccf1aa04964ca454a8682f3..6d9bbae401b37f9a68128acd83202da6b7696e56 100644 (file)
@@ -491,7 +491,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,
@@ -559,7 +559,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,
@@ -590,7 +590,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,
@@ -622,7 +622,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,