From: zhong jiang Date: Thu, 4 Oct 2018 05:02:53 +0000 (+0800) Subject: misc: cxl: Fix possible null pointer dereference X-Git-Tag: v4.19.86~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5d017065cec9b946e709ec18ae2a59594ee94736;p=thirdparty%2Fkernel%2Fstable.git 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 Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c index b83a373e3a8dd..08f4a512afad2 100644 --- a/drivers/misc/cxl/guest.c +++ b/drivers/misc/cxl/guest.c @@ -1020,8 +1020,6 @@ err1: void cxl_guest_remove_afu(struct cxl_afu *afu) { - pr_devel("in %s - AFU(%d)\n", __func__, afu->slice); - if (!afu) return;