diff options
| author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-06-07 16:56:15 +0300 |
|---|---|---|
| committer | Ben Hutchings <ben@decadent.org.uk> | 2017-11-11 13:34:46 +0000 |
| commit | 615514a2cac10d1b92e3ed06e1c1d884d8c4333a (patch) | |
| tree | ba61d8ed29f368e0f27776d2854e8ee75f329bdd /drivers | |
| parent | bb754dd4e818782b0ffa5ab775300882ff54f34f (diff) | |
| download | linux-615514a2cac10d1b92e3ed06e1c1d884d8c4333a.tar.gz linux-615514a2cac10d1b92e3ed06e1c1d884d8c4333a.tar.bz2 linux-615514a2cac10d1b92e3ed06e1c1d884d8c4333a.zip | |
platform/x86: samsung-laptop: Initialize loca variable
commit 0d2c95354a3b63256e92d9fb865c08902d2c9b0b upstream.
The variable is used uninitialized which might come into unexpected
behaviour on some Samsung laptops.
Initialize it to 0xffff which seems a proper value for non-supported
feature.
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/platform/x86/samsung-laptop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c index 64e1f2d104ad..7ec43a51f138 100644 --- a/drivers/platform/x86/samsung-laptop.c +++ b/drivers/platform/x86/samsung-laptop.c @@ -601,7 +601,7 @@ static int __init samsung_init(void) struct sabi_retval sretval; unsigned int ifaceP; int i; - int loca; + int loca = 0xffff; int retval; if (efi_enabled(EFI_BOOT)) |
