Re: [PATCH v2] mtd: powernv_flash: check return value of devm_kasprintf()

Miquel Raynal
2023-10-19T06:26:24Z

Hi Yi,

yiyang13@huawei.com wrote on Thu, 19 Oct 2023 01:30:50 +0000:

> devm_kasprintf() returns a pointer to dynamically allocated memory
> which can be NULL upon failure. Ensure the allocation was successful by
> checking the pointer validity.
>
> Fixes: acfe63ec1c59 ("mtd: Convert to using %pOFn instead of device_node.name")
> Signed-off-by: Yi Yang <yiyang13@huawei.com>

Please re-read my previous answer and address all comments.

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list