Re: [PATCH v2] pinctrl:sunplus: Add check for kmalloc

From: Linus Walleij
Date: Tue May 30 2023 - 07:48:53 EST


On Sun, May 28, 2023 at 2:35 PM Wells Lu <wellslutw@xxxxxxxxx> wrote:

> Fix Smatch static checker warning:
> potential null dereference 'configs'. (kmalloc returns null)
>
> Changes in v2:
> 1. Add free allocated memory before returned -ENOMEM.
> 2. Add call of_node_put() before returned -ENOMEM.
>
> Fixes: aa74c44be19c ("pinctrl: Add driver for Sunplus SP7021")
> Signed-off-by: Wells Lu <wellslutw@xxxxxxxxx>

Patch applied as non-urgent fix, dropped the changelog as pointed
out by Andy.

Yours,
Linus Walleij