[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75VfxsBN4E3aeME8HKWtjuOPC2meuJ4hweOcXf-te5kotYg@mail.gmail.com>
Date: Sun, 16 Jan 2022 23:19:46 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: xkernel.wang@...mail.com
Cc: Andy Shevchenko <andy@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpio: merrifield: check the return value of devm_kstrdup()
On Sun, Jan 16, 2022 at 10:21 AM <xkernel.wang@...mail.com> wrote:
>
> From: Xiaoke Wang <xkernel.wang@...mail.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
Powered by blists - more mailing lists