lkml.org 
[lkml]   [2018]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] pinctrl: sx150x: handle failure case of devm_kstrdup
On Sun, Dec 2, 2018 at 11:08 AM Nicholas Mc Guire <hofrat@osadl.org> 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@osadl.org>
> 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

\
 
 \ /
  Last update: 2018-12-07 13:23    [W:0.027 / U:2.840 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site