libertas: make lbs_process_event() void
authorJason Yan <yanaijie@huawei.com>
Mon, 13 Apr 2020 08:20:22 +0000 (16:20 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 15 Apr 2020 08:46:12 +0000 (11:46 +0300)
Fix the following coccicheck warning:

drivers/net/wireless/marvell/libertas/cmdresp.c:225:5-8: Unneeded
variable: "ret". Return "0" on line 355

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200413082022.22380-1-yanaijie@huawei.com
drivers/net/wireless/marvell/libertas/cmd.h
drivers/net/wireless/marvell/libertas/cmdresp.c

index 8087856..3c19307 100644 (file)
@@ -76,7 +76,7 @@ void lbs_mac_event_disconnected(struct lbs_private *priv,
 
 /* Events */
 
-int lbs_process_event(struct lbs_private *priv, u32 event);
+void lbs_process_event(struct lbs_private *priv, u32 event);
 
 
 /* Actual commands */
index b73d083..cb515c5 100644 (file)
@@ -220,9 +220,8 @@ done:
        return ret;
 }
 
-int lbs_process_event(struct lbs_private *priv, u32 event)
+void lbs_process_event(struct lbs_private *priv, u32 event)
 {
-       int ret = 0;
        struct cmd_header cmd;
 
        switch (event) {
@@ -351,6 +350,4 @@ int lbs_process_event(struct lbs_private *priv, u32 event)
                netdev_alert(priv->dev, "EVENT: unknown event id %d\n", event);
                break;
        }
-
-       return ret;
 }