From: zhong jiang Date: Thu, 4 Oct 2018 05:02:53 +0000 (+0800) Subject: misc: cxl: Fix possible null pointer dereference X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3dac3583bf1a61db6aaf31dfd752c677a4400afd;p=linux.git 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 Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c index 3bc0c15d4d85b..5d28d9e454f52 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;