]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Input: elan_i2c - switch to using cleanup functions
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 25 Aug 2024 05:28:43 +0000 (22:28 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 3 Oct 2024 15:42:45 +0000 (08:42 -0700)
commit2e26a761619ed437b1e1b22c27eabdffb708c9f2
tree5e4c9d5e7a34ead067549f85776d1817fc89a51b
parentc610e95f7769e52ae9f62eb3b5169ee3f7653905
Input: elan_i2c - switch to using cleanup functions

Start using __free() and guard() primitives to simplify the code
and error handling. This makes the code more compact and error
handling more robust by ensuring that locks are released in all
code paths when control leaves critical section and all allocated
memory is freed.

Link: https://lore.kernel.org/r/ZsrBC7qDbOvAaI-W@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/elan_i2c_core.c
drivers/input/mouse/elan_i2c_i2c.c