thermal: intel: hfi: remove NULL check after container_of() call
authorHaowen Bai <baihaowen@meizu.com>
Tue, 17 May 2022 01:31:01 +0000 (09:31 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 18 May 2022 18:53:05 +0000 (20:53 +0200)
container_of() will never return NULL, so remove useless code.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/intel/intel_hfi.c

index 730fd121df6ec3582499d94503f0ec89dc89cb1c..a0640f762dc5de9501648550c6a9ab13064d8150 100644 (file)
@@ -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);
 }