[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211108111637.c3vsesezc7hwjbty@liuwe-devbox-debian-v2>
Date: Mon, 8 Nov 2021 11:16:37 +0000
From: Wei Liu <wei.liu@...nel.org>
To: Borislav Petkov <bp@...en8.de>
Cc: LKML <linux-kernel@...r.kernel.org>, linux-hyperv@...r.kernel.org,
Wei Liu <wei.liu@...nel.org>
Subject: Re: [PATCH v0 08/42] Drivers: hv: vmbus: Check notifier registration
return value
On Mon, Nov 08, 2021 at 11:11:23AM +0100, Borislav Petkov wrote:
> From: Borislav Petkov <bp@...e.de>
>
> Avoid homegrown notifier registration checks.
>
> No functional changes.
>
> Signed-off-by: Borislav Petkov <bp@...e.de>
> Cc: linux-hyperv@...r.kernel.org
Acked-by: Wei Liu <wei.liu@...nel.org>
> ---
> drivers/hv/vmbus_drv.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> index 392c1ac4f819..370afd108d2d 100644
> --- a/drivers/hv/vmbus_drv.c
> +++ b/drivers/hv/vmbus_drv.c
> @@ -1574,8 +1574,8 @@ static int vmbus_bus_init(void)
> * the VMbus channel connection to prevent any VMbus
> * activity after the VM panics.
> */
> - atomic_notifier_chain_register(&panic_notifier_list,
> - &hyperv_panic_block);
> + if (atomic_notifier_chain_register(&panic_notifier_list, &hyperv_panic_block))
> + pr_warn("VMBus panic notifier already registered\n");
>
> vmbus_request_offers();
>
> --
> 2.29.2
>
Powered by blists - more mailing lists