staging: r8188eu: mark _rtw_free_sta_priv as void
authorVihas Makwana <makvihas@gmail.com>
Sun, 13 Feb 2022 17:34:26 +0000 (23:04 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Feb 2022 16:12:37 +0000 (17:12 +0100)
_rtw_free_sta_priv() always returns _SUCCESS and it's return value
isn't checked either.
So it makes sense to mark it as void instead of u32.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220213173424.39935-1-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_sta_mgt.c
drivers/staging/r8188eu/include/sta_info.h

index de5406a5870c3fe2e4bcf4c88063d0c201cbf8e0..79b49a13fe613d48b88b9a95d9cefcffc7dc1af6 100644 (file)
@@ -117,7 +117,7 @@ inline struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int
        return (struct sta_info *)(stapriv->pstainfo_buf + offset * sizeof(struct sta_info));
 }
 
-u32    _rtw_free_sta_priv(struct       sta_priv *pstapriv)
+void _rtw_free_sta_priv(struct sta_priv *pstapriv)
 {
        struct list_head *phead, *plist;
        struct sta_info *psta = NULL;
@@ -147,8 +147,6 @@ u32 _rtw_free_sta_priv(struct       sta_priv *pstapriv)
 
                vfree(pstapriv->pallocated_stainfo_buf);
        }
-
-       return _SUCCESS;
 }
 
 struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
index 24b1254310b23aeeb246955842b13e8eaa0738e0..23f6a85bf017df5b46be98b3ed6b5669595bd90e 100644 (file)
@@ -344,7 +344,7 @@ static inline u32 wifi_mac_hash(u8 *mac)
 }
 
 extern u32     _rtw_init_sta_priv(struct sta_priv *pstapriv);
-extern u32     _rtw_free_sta_priv(struct sta_priv *pstapriv);
+extern void _rtw_free_sta_priv(struct sta_priv *pstapriv);
 
 #define stainfo_offset_valid(offset) (offset < NUM_STA && offset >= 0)
 int rtw_stainfo_offset(struct sta_priv *stapriv, struct sta_info *sta);