diff options
author | zhong jiang <zhongjiang@huawei.com> | 2018-10-04 08:02:53 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-25 11:53:52 +0300 |
commit | b8199f6a79919919fe043f719baffab13c585bf0 (patch) | |
tree | 84ded00ca3309a96c704028f666079e5ec9abd47 | |
parent | f3c5e428e08b6e40c9c1f2972ae1f78ab5b4e5c2 (diff) | |
download | linux-b8199f6a79919919fe043f719baffab13c585bf0.tar.xz |
misc: cxl: Fix possible null pointer dereference
[ Upstream commit 3dac3583bf1a61db6aaf31dfd752c677a4400afd ]
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: zhong jiang <zhongjiang@huawei.com>
Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/misc/cxl/guest.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c index 3e102cd6ed91..d08509cd978a 100644 --- a/drivers/misc/cxl/guest.c +++ b/drivers/misc/cxl/guest.c @@ -1026,8 +1026,6 @@ err1: void cxl_guest_remove_afu(struct cxl_afu *afu) { - pr_devel("in %s - AFU(%d)\n", __func__, afu->slice); - if (!afu) return; |