On Mon, Apr 22, 2024 at 11:29 AM Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx> wrote: > On Sun, 21 Apr 2024, Hans de Goede wrote: ... > > + int mode = adaptive_keyboard_get_mode(); > > + > > + if (mode < 0) > > Please try to keep call and it's error handling together, it costs one > line but takes less effort to understand: > > int mode; > > mode = adaptive_keyboard_get_mode(); > if (mode < 0) > > > + return; And not only that. In long-term maintenance the original code is prone to subtle errors in case some other code is squeezed in between. -- With Best Regards, Andy Shevchenko _______________________________________________ ibm-acpi-devel mailing list ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel