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>
This commit is contained in:
		
							parent
							
								
									e862faa968
								
							
						
					
					
						commit
						3dac3583bf
					
				| @ -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; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user