sony-laptop: fix SNC buffer calls when SN06 returns Integers
sony-laptop: fix SNC buffer calls when SN06 returns Integers

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: <4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@vger.kernel.org>
Cc: Fabrizio Narni <787c9bbf9a062ce7809f3ad4023df208ab5a743b@gmail.com>
Cc: <ab2b38e182a764731b638e5c10aefd0f6edca27a@gmail.com>
Signed-off-by: Mattia Dongili <564ea3fba55f6e029e83434fb6b3f3b9c7ed334e@linux.it>
Signed-off-by: Matthew Garrett <d1dada306f6f6bc535ec5238317ee8d221588a1a@nebula.com>

TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas