Re: [PATCH] gpio: merrifield: check the return value of devm_kstrdup()

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

 



On Sun, Jan 16, 2022 at 10:21 AM <xkernel.wang@xxxxxxxxxxx> wrote:
>
> From: Xiaoke Wang <xkernel.wang@xxxxxxxxxxx>
>
> 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



[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