From: Haowen Bai Date: Mon, 16 May 2022 10:18:41 +0000 (+0800) Subject: staging: ks7010: remove null check after call container_of() X-Git-Tag: v5.19-rc1~48^2~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3baab4bc2f5a1eb083a4c4d25d393a4fec87fd48;p=thirdparty%2Flinux.git staging: ks7010: remove null check after call container_of() container_of() will never return NULL, so remove useless code. Signed-off-by: Haowen Bai Link: https://lore.kernel.org/r/1652696322-17685-1-git-send-email-baihaowen@meizu.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index d0475189607db..9429ee1559106 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;