lkml.org 
[lkml]   [2018]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] misc: cxl: Move a deference below a NULL test
On Wed, Sep 26, 2018 at 07:41:12PM +0800, zhong jiang wrote:
> It is safe to move a deference below a NULL test.
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
> ---
> drivers/misc/cxl/guest.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c
> index 3bc0c15..559e835 100644
> --- a/drivers/misc/cxl/guest.c
> +++ b/drivers/misc/cxl/guest.c
> @@ -1018,11 +1018,11 @@ int cxl_guest_init_afu(struct cxl *adapter, int slice, struct device_node *afu_n
>
> void cxl_guest_remove_afu(struct cxl_afu *afu)
> {
> - pr_devel("in %s - AFU(%d)\n", __func__, afu->slice);
> -
> if (!afu)
> return;
>
> + pr_devel("in %s - AFU(%d)\n", __func__, afu->slice);
> +

This call should just be deleted, ftrace can be used if this type of
thing is really needed.

thanks,

greg k-h

\
 
 \ /
  Last update: 2018-10-03 00:57    [W:0.060 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site