From nobody Sun Jun 14 16:17:52 2026 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 B687DC433F5 for ; Mon, 16 May 2022 10:18:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242386AbiEPKSv (ORCPT ); Mon, 16 May 2022 06:18:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233754AbiEPKSr (ORCPT ); Mon, 16 May 2022 06:18:47 -0400 Received: from mail.meizu.com (edge01.meizu.com [14.29.68.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3E63DE97 for ; Mon, 16 May 2022 03:18:45 -0700 (PDT) Received: from IT-EXMB-1-125.meizu.com (172.16.1.125) by mz-mail04.meizu.com (172.16.1.16) with Microsoft SMTP Server (TLS) id 14.3.487.0; Mon, 16 May 2022 18:18:47 +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; Mon, 16 May 2022 18:18:43 +0800 From: Haowen Bai To: Greg Kroah-Hartman CC: Haowen Bai , , Subject: [PATCH] staging: ks7010: remove null check after call container_of() Date: Mon, 16 May 2022 18:18:41 +0800 Message-ID: <1652696322-17685-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-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" container_of() will never return NULL, so remove useless code. Signed-off-by: Haowen Bai --- drivers/staging/ks7010/ks_hostif.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks= _hostif.c index d0475189607d..9429ee155910 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -2201,8 +2201,6 @@ static void hostif_sme_work(struct work_struct *work) struct ks_wlan_private *priv; =20 priv =3D container_of(work, struct ks_wlan_private, sme_work); - if (!priv) - return; =20 if (priv->dev_state < DEVICE_STATE_BOOT) return; --=20 2.7.4