Skip to content
Commit 74ac5b5e authored by Yi Yang's avatar Yi Yang Committed by Miquel Raynal
Browse files

mtd: rawnand: intel: check return value of devm_kasprintf()



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: 0b1039f0 ("mtd: rawnand: Add NAND controller support on Intel LGM SoC")
Signed-off-by: default avatarYi Yang <yiyang13@huawei.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20231019065537.318391-1-yiyang13@huawei.com
parent 60ec53ac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment