mbox series

[0/3] Handle errors returned by radix_tree_insert() within drivers/pinctrl/

Message ID 20230719202253.13469-1-s.shtylyov@omp.ru
Headers show
Series Handle errors returned by radix_tree_insert() within drivers/pinctrl/ | expand

Message

Sergey Shtylyov July 19, 2023, 8:22 p.m. UTC
Here are 3  patches against the 'devel' branch of Linus W.'s 'linux-pinctrl.git'
repo...

The code in drivers/pinctrl/ doesn't check the results of radix_tree_insert()
calls, although it could propagate the errors from the callers upstream.
(Linus Walleij said he has copied the radix tree code from kernel/irq/,
where the functions calling radix_tree_insert() are *void* themselves.)

Sergey Shtylyov (3):
  pinctrl: core: handle radix_tree_insert() errors in
    pinctrl_generic_add_group()
  pinctrl: core: handle radix_tree_insert() errors in
    pinctrl_register_one_pin()
  pinctrl: pinmux: handle radix_tree_insert() errors in
    pinmux_generic_add_function()

 drivers/pinctrl/core.c   | 20 +++++++++++++++-----
 drivers/pinctrl/pinmux.c |  6 ++++--
 2 files changed, 19 insertions(+), 7 deletions(-)

Comments

Linus Walleij July 28, 2023, 8:09 p.m. UTC | #1
On Wed, Jul 19, 2023 at 10:23 PM Sergey Shtylyov <s.shtylyov@omp.ru> wrote:

> The code in drivers/pinctrl/ doesn't check the results of radix_tree_insert()
> calls, although it could propagate the errors from the callers upstream.
> (Linus Walleij said he has copied the radix tree code from kernel/irq/,
> where the functions calling radix_tree_insert() are *void* themselves.)

The fix is spot on.
Patches applied!

Yours,
Linus Walleij
Sergey Shtylyov July 31, 2023, 10:55 a.m. UTC | #2
On 7/28/23 11:09 PM, Linus Walleij wrote:
[...]

>> The code in drivers/pinctrl/ doesn't check the results of radix_tree_insert()
>> calls, although it could propagate the errors from the callers upstream.
>> (Linus Walleij said he has copied the radix tree code from kernel/irq/,
>> where the functions calling radix_tree_insert() are *void* themselves.)
> 
> The fix is spot on.
> Patches applied!

   Thank you!
   But to which branch?

> Yours,
> Linus Walleij

MBR, Sergey