]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: sony-laptop: Fix error handling in sony_nc_setup_rfkill()
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 1 Nov 2017 17:42:45 +0000 (18:42 +0100)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sun, 5 Nov 2017 11:53:13 +0000 (13:53 +0200)
commitc75420218b229a0b9ecde9ae36551bda51925557
treee5e6bfc068539db2c2caf9b7275206d559f84171
parenta76a46101459e84a72134c62cb9e09a379aff2b1
platform/x86: sony-laptop: Fix error handling in sony_nc_setup_rfkill()

Source code review for a specific software refactoring showed the need
for another correction because the error code "-1" was returned so far
if a call of the function "sony_call_snc_handle" failed here.
Thus assign the return value from these two function calls also to
the variable "err" and provide it in case of a failure.

Fixes: 37886cfa0f90aecb5e9156a393300e0026af8f7a ("sony-laptop: use soft rfkill status stored in hw")
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lkml.org/lkml/2017/10/31/463
Link: https://lkml.kernel.org/r/<CAHp75VcMkXCioCzmLE0+BTmkqc5RSOx9yPO0ectVHMrMvewgwg@mail.gmail.com>
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/sony-laptop.c