[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <69a3698c-dac9-1b9f-1161-f55b7b01780e@au1.ibm.com>
Date: Thu, 27 Sep 2018 09:46:16 +1000
From: Andrew Donnellan <andrew.donnellan@....ibm.com>
To: zhong jiang <zhongjiang@...wei.com>, gregkh@...uxfoundation.org
Cc: fbarrat@...ux.vnet.ibm.com, arnd@...db.de,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] misc: cxl: Move a deference below a NULL test
On 26/9/18 9:41 pm, zhong jiang wrote:
> It is safe to move a deference below a NULL test.
>
> Signed-off-by: zhong jiang <zhongjiang@...wei.com>
Thanks for catching this.
Acked-by: Andrew Donnellan <andrew.donnellan@....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);
> +
> /* flush and stop pending job */
> afu->guest->handle_err = false;
> flush_delayed_work(&afu->guest->work_err);
>
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan@....ibm.com IBM Australia Limited
Powered by blists - more mailing lists