Re: [PATCH] sh: kfr2r09: Fix serial I2C adapter reference leak
Geert Uytterhoeven <[email protected]> Wed, 24 Jun 2026 10:20:40 +0200
| Newsgroups | org.kernel.vger.linux-sh,org.kernel.vger.linux-kernel,org.kernel.vger.stable |
|---|---|
| Message-ID | <CAMuHMdUDQK6SWjGzycqRvENQK1zJqdHuwdpKCsFD2260F-k-ZA@mail.gmail.com> |
Hi Haoxiang, On Tue, 23 Jun 2026 at 23:16, Haoxiang Li <[email protected]> wrote: > kfr2r09_serial_i2c_setup() gets I2C adapter 0 with i2c_get_adapter(), > but returns without dropping the reference. Release the adapter with > i2c_put_adapter() before returning from all paths after i2c_get_adapter() > succeeds. > > Fixes: e6d8460aca63 ("sh: Improve kfr2r09 serial port setup code") > Cc: [email protected] > Signed-off-by: Haoxiang Li <[email protected]> Thanks for your patch! Before posting (or better: writing) a patch, please check if it has been posted before: "[PATCH 0/2] sh: kfr2r09: fix i2c adapter leaks" https://lore.kernel.org/[email protected]/ Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds