]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
msi-laptop: Work around gcc warning
authorMaxim Mikityanskiy <maxtram95@gmail.com>
Sat, 15 Dec 2012 17:31:26 +0000 (19:31 +0200)
committerMatthew Garrett <matthew.garrett@nebula.com>
Wed, 26 Dec 2012 15:06:28 +0000 (10:06 -0500)
Assign initial value to variable in order to prevent gcc warning about
uninitialized variable.

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
drivers/platform/x86/msi-laptop.c

index 063113ca299ed7bcc7f1976175fff3034e118c8f..7ba107ae1d097dd84a891d246585477c24a70151 100644 (file)
@@ -291,7 +291,7 @@ static ssize_t show_wlan(struct device *dev,
        struct device_attribute *attr, char *buf)
 {
 
-       int ret, enabled;
+       int ret, enabled = 0;
 
        if (old_ec_model) {
                ret = get_wireless_state(&enabled, NULL);
@@ -315,7 +315,7 @@ static ssize_t show_bluetooth(struct device *dev,
        struct device_attribute *attr, char *buf)
 {
 
-       int ret, enabled;
+       int ret, enabled = 0;
 
        if (old_ec_model) {
                ret = get_wireless_state(NULL, &enabled);