misc: cxl: Fix possible null pointer dereference
authorzhong jiang <zhongjiang@huawei.com>
Thu, 4 Oct 2018 05:02:53 +0000 (13:02 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2019 07:23:32 +0000 (08:23 +0100)
commitda8f0b1fa0b1329a5b75d460ff12840c26ad310b
tree1451147f9ce31c76b885b0fcdc7a7ddb281ad4eb
parentb72443ac86e762f31681861dac3f6b4e58ee7e38
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>
drivers/misc/cxl/guest.c