Commit efeaa239 authored by Chen Ni's avatar Chen Ni Committed by Greg Kroah-Hartman
Browse files

libnvdimm/of_pmem: Use devm_kstrdup instead of kstrdup and check its return value



[ Upstream commit 6fd4ebfc ]

Use devm_kstrdup() instead of kstrdup() and check its return value to
avoid memory leak.

Fixes: 49bddc73 ("libnvdimm/of_pmem: Provide a unique name for bus provider")
Signed-off-by: default avatarChen Ni <nichen@iscas.ac.cn>
Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Reviewed-by: default avatarDave Jiang <dave.jiang@intel.com>
Signed-off-by: default avatarIra Weiny <ira.weiny@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent ffb3483c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment