[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0jgLd2qZw5s6e8S6i3D+RU8cvy1iGCMcadG0SHVKKpEoA@mail.gmail.com>
Date: Wed, 18 May 2022 20:54:33 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Haowen Bai <baihaowen@...zu.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Amit Kucheria <amitk@...nel.org>,
Zhang Rui <rui.zhang@...el.com>,
Linux PM <linux-pm@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] thermal: intel: hfi: remove null check after call container_of()
On Tue, May 17, 2022 at 3:31 AM Haowen Bai <baihaowen@...zu.com> wrote:
>
> container_of() will never return NULL, so remove useless code.
>
> Signed-off-by: Haowen Bai <baihaowen@...zu.com>
> ---
> drivers/thermal/intel/intel_hfi.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/thermal/intel/intel_hfi.c b/drivers/thermal/intel/intel_hfi.c
> index 730fd121df6e..a0640f762dc5 100644
> --- a/drivers/thermal/intel/intel_hfi.c
> +++ b/drivers/thermal/intel/intel_hfi.c
> @@ -243,8 +243,6 @@ static void hfi_update_work_fn(struct work_struct *work)
>
> hfi_instance = container_of(to_delayed_work(work), struct hfi_instance,
> update_work);
> - if (!hfi_instance)
> - return;
>
> update_capabilities(hfi_instance);
> }
> --
Applied with adjusted subject as 5.19 material, thanks!
Powered by blists - more mailing lists