Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 77ae53c4 authored by Yi Yang's avatar Yi Yang Committed by Greg Kroah-Hartman
Browse files

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: default avatarYi Yang <yiyang13@huawei.com>
Reviewed-by: default avatarDave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20241108085526.527957-1-yiyang13@huawei.com


Signed-off-by: default avatarIra Weiny <ira.weiny@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 61b32d4a
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