Re: [PATCH] libnvdimm/of_pmem: Replace kstrdup with devm_kstrdup and add check

2023-06-23 Thread Ira Weiny
Jiasheng Jiang wrote: > Replace kstrdup() with devm_kstrdup() to avoid memory leak and > add check for the return value of the devm_kstrdup() to avoid > NULL pointer dereference > > Fixes: 49bddc73d15c ("libnvdimm/of_pmem: Provide a unique name for bus > provider") > Signed-off-by: Jiasheng

[PATCH] libnvdimm/of_pmem: Replace kstrdup with devm_kstrdup and add check

2023-06-22 Thread Jiasheng Jiang
Replace kstrdup() with devm_kstrdup() to avoid memory leak and add check for the return value of the devm_kstrdup() to avoid NULL pointer dereference Fixes: 49bddc73d15c ("libnvdimm/of_pmem: Provide a unique name for bus provider") Signed-off-by: Jiasheng Jiang --- drivers/nvdimm/of_pmem.c | 7