Commit 5d017065 authored by zhong jiang's avatar zhong jiang Committed by Greg Kroah-Hartman

misc: cxl: Fix possible null pointer dereference

[ Upstream commit 3dac3583 ]

It is not safe to dereference an object before a null test. It is
not needed and just remove them. Ftrace can be used instead.
Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Acked-by: default avatarAndrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: default avatarFrederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 9089b2f0
...@@ -1020,8 +1020,6 @@ int cxl_guest_init_afu(struct cxl *adapter, int slice, struct device_node *afu_n ...@@ -1020,8 +1020,6 @@ int cxl_guest_init_afu(struct cxl *adapter, int slice, struct device_node *afu_n
void cxl_guest_remove_afu(struct cxl_afu *afu) void cxl_guest_remove_afu(struct cxl_afu *afu)
{ {
pr_devel("in %s - AFU(%d)\n", __func__, afu->slice);
if (!afu) if (!afu)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment