lkml.org 
[lkml]   [2022]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] gpio: merrifield: check the return value of devm_kstrdup()
On Sun, Jan 16, 2022 at 10:21 AM <xkernel.wang@foxmail.com> wrote:
>
> From: Xiaoke Wang <xkernel.wang@foxmail.com>
>
> devm_kstrdup() returns pointer to allocated string on success,
> NULL on failure. So it is better to check the return value of it.

Before if devm_kstrdup() fails, the GPIO driver will be registered
without pin control, now it will fail the registration.

It's not that I'm against the patch (the above is quite unlikely and
brings a not fully working system on most of the known platforms with
this SoC), but you need to do better your analysis. That said, please
rethink a bit the commit message you put there and send an updated
version.


--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2022-01-16 22:21    [W:0.167 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site