summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2018-10-04 08:02:53 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-11 13:15:03 +0300
commit3dac3583bf1a61db6aaf31dfd752c677a4400afd (patch)
tree9df66dbd15bf17fc7376e5c5ddf6b855aba1cf7a
parente862faa968400206aae3bf8de0d4beb766498657 (diff)
downloadlinux-3dac3583bf1a61db6aaf31dfd752c677a4400afd.tar.xz
misc: cxl: Fix possible null pointer dereference
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>
-rw-r--r--drivers/misc/cxl/guest.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c
index 3bc0c15d4d85..5d28d9e454f5 100644
--- a/drivers/misc/cxl/guest.c
+++ b/drivers/misc/cxl/guest.c
@@ -1018,8 +1018,6 @@ err1:
void cxl_guest_remove_afu(struct cxl_afu *afu)
{
- pr_devel("in %s - AFU(%d)\n", __func__, afu->slice);
-
if (!afu)
return;