sst-linux/drivers/nvdimm
Yi Yang 12433c87d2 nvdimm: rectify the illogical code within nd_dax_probe()
[ Upstream commit b61352101470f8b68c98af674e187cfaa7c43504 ]

When nd_dax is NULL, nd_pfn is consequently NULL as well. Nevertheless,
it is inadvisable to perform pointer arithmetic or address-taking on a
NULL pointer.
Introduce the nd_dax_devinit() function to enhance the code's logic and
improve its readability.

Signed-off-by: Yi Yang <yiyang13@huawei.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20241108085526.527957-1-yiyang13@huawei.com
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-14 19:54:47 +01:00
..
badrange.c
btt_devs.c
btt.c
btt.h
bus.c
claim.c
core.c
dax_devs.c
dimm_devs.c
dimm.c
e820.c
Kconfig
label.c
label.h
Makefile
namespace_devs.c
nd_perf.c
nd_virtio.c
nd-core.h
nd.h
of_pmem.c
pfn_devs.c
pfn.h
pmem.c
pmem.h
region_devs.c
region.c
security.c
virtio_pmem.c
virtio_pmem.h