From patchwork Tue May 17 01:31:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: baihaowen X-Patchwork-Id: 12851794 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50BE1C433F5 for ; Tue, 17 May 2022 01:31:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229486AbiEQBbK (ORCPT ); Mon, 16 May 2022 21:31:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235279AbiEQBbJ (ORCPT ); Mon, 16 May 2022 21:31:09 -0400 Received: from mail.meizu.com (edge07.meizu.com [112.91.151.210]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C83F2BC4; Mon, 16 May 2022 18:31:05 -0700 (PDT) Received: from IT-EXMB-1-125.meizu.com (172.16.1.125) by mz-mail11.meizu.com (172.16.1.15) with Microsoft SMTP Server (TLS) id 14.3.487.0; Tue, 17 May 2022 09:31:04 +0800 Received: from meizu.meizu.com (172.16.137.70) by IT-EXMB-1-125.meizu.com (172.16.1.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Tue, 17 May 2022 09:31:02 +0800 From: Haowen Bai To: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui CC: Haowen Bai , , Subject: [PATCH] thermal: intel: hfi: remove null check after call container_of() Date: Tue, 17 May 2022 09:31:01 +0800 Message-ID: <1652751061-23045-1-git-send-email-baihaowen@meizu.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [172.16.137.70] X-ClientProxiedBy: IT-EXMB-1-126.meizu.com (172.16.1.126) To IT-EXMB-1-125.meizu.com (172.16.1.125) Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org container_of() will never return NULL, so remove useless code. Signed-off-by: Haowen Bai --- 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); }