lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1652696322-17685-1-git-send-email-baihaowen@meizu.com>
Date:   Mon, 16 May 2022 18:18:41 +0800
From:   Haowen Bai <baihaowen@...zu.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC:     Haowen Bai <baihaowen@...zu.com>, <linux-staging@...ts.linux.dev>,
        <linux-kernel@...r.kernel.org>
Subject: [PATCH] staging: ks7010: remove null check after call container_of()

container_of() will never return NULL, so remove useless code.

Signed-off-by: Haowen Bai <baihaowen@...zu.com>
---
 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;
 
 	priv = container_of(work, struct ks_wlan_private, sme_work);
-	if (!priv)
-		return;
 
 	if (priv->dev_state < DEVICE_STATE_BOOT)
 		return;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ