aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/surface/aggregator/controller.c
diff options
context:
space:
mode:
authorAndy Shevchenko <[email protected]>2024-08-29 16:50:32 +0000
committerHans de Goede <[email protected]>2024-09-04 18:17:31 +0000
commita093cb667c3ff5eadd4b23ddf996d9ccae9b7ac6 (patch)
tree7dbff4de9dac50ab27ca37ffd0738c96d16f4d0d /drivers/platform/surface/aggregator/controller.c
parentplatform/x86/intel-uncore-freq: Add efficiency latency control to sysfs inter... (diff)
downloadkernel-a093cb667c3ff5eadd4b23ddf996d9ccae9b7ac6.tar.gz
kernel-a093cb667c3ff5eadd4b23ddf996d9ccae9b7ac6.zip
platform/x86: ideapad-laptop: Make the scope_guard() clear of its scope
First of all, it's a bit counterintuitive to have something like int err; ... scoped_guard(...) err = foo(...); if (err) return err; Second, with a particular kernel configuration and compiler version in one of such cases the objtool is not happy: ideapad-laptop.o: warning: objtool: .text.fan_mode_show: unexpected end of section I'm not an expert on all this, but the theory is that compiler and linker in this case can't understand that 'result' variable will be always initialized as long as no error has been returned. Assigning 'result' to a dummy value helps with this. Note, that fixing the scoped_guard() scope (as per above) does not make issue gone. That said, assign dummy value and make the scope_guard() clear of its scope. For the sake of consistency do it in the entire file. Fixes: 7cc06e729460 ("platform/x86: ideapad-laptop: add a mutex to synchronize VPC commands") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
Diffstat (limited to 'drivers/platform/surface/aggregator/controller.c')
0 files changed, 0 insertions, 0 deletions