staging: rtl8192u: remove null check after call container_of()
authorHaowen Bai <baihaowen@meizu.com>
Mon, 16 May 2022 10:22:12 +0000 (18:22 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 May 2022 15:42:53 +0000 (17:42 +0200)
container_of() will never return NULL, so remove useless code.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Link: https://lore.kernel.org/r/1652696533-18011-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c

index 7fdce75..92001cb 100644 (file)
@@ -1700,8 +1700,6 @@ static inline void ieee80211_sta_ps(struct work_struct *work)
        unsigned long flags, flags2;
 
        ieee = container_of(work, struct ieee80211_device, ps_task);
-       if (!ieee)
-               return;
 
        spin_lock_irqsave(&ieee->lock, flags);