]> git.karo-electronics.de Git - karo-tx-linux.git/commit
sony-laptop: fix SNC buffer calls when SN06 returns Integers
authorMattia Dongili <malattia@linux.it>
Thu, 20 Dec 2012 22:21:09 +0000 (07:21 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 16:45:57 +0000 (08:45 -0800)
commit40e76e0a9e3211830067cfb248f27a91c48bee57
tree859a65be30890d29605a7ad2a1b2ca31c9adc987
parent948dd7e6ca27070bfc2831e64f2178abc1465b98
sony-laptop: fix SNC buffer calls when SN06 returns Integers

commit dcbeec264d73b7228ffdfe767eab69b2353099b1 upstream.

SN06 in some cases returns an Integer instead of a buffer. While the
code handling the return value was trying to cope with the difference,
the memcpy call was not making any difference between the two types of
acpi_object union. This regression was introduced in 3.5.
While there also rework the return value logic to improve readability.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=48671
Cc: Fabrizio Narni <shibotto@gmail.com>
Cc: <mus.svz@gmail.com>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/x86/sony-laptop.c