nvdimm: rectify the illogical code within nd_dax_probe()
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>
Loading
Please register or sign in to comment