Re: [PATCH] pinctrl: sx150x: handle failure case of devm_kstrdup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Dec 2, 2018 at 11:08 AM Nicholas Mc Guire <hofrat@xxxxxxxxx> wrote:

> devm_kstrdup() may return NULL if internal allocation failed.
> Thus using  label, name  is unsafe without checking. Therefor
> in the unlikely case of allocation failure, sx150x_probe() simply
> returns -ENOMEM.
>
> Signed-off-by: Nicholas Mc Guire <hofrat@xxxxxxxxx>
> Fixes: 9e80f9064e73 ("pinctrl: Add SX150X GPIO Extender Pinctrl Driver")

Patch applied.

> Problem located with an experimental coccinelle script

I like this script.

Yours,
Linus Walleij



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux