Skip to content

Commit

Permalink
libertas: make lbs_init_mesh() void
Browse files Browse the repository at this point in the history
Fix the following coccicheck warning:

drivers/net/wireless/marvell/libertas/mesh.c:833:5-8: Unneeded variable:
"ret". Return "0" on line 874

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Reviewed-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200410090942.27239-1-yanaijie@huawei.com
  • Loading branch information
Jason Yan authored and Kalle Valo committed Apr 15, 2020
1 parent 80efb44 commit 2fd5fdc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions drivers/net/wireless/marvell/libertas/mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,10 +828,8 @@ static void lbs_persist_config_remove(struct net_device *dev)
* Check mesh FW version and appropriately send the mesh start
* command
*/
int lbs_init_mesh(struct lbs_private *priv)
void lbs_init_mesh(struct lbs_private *priv)
{
int ret = 0;

/* Determine mesh_fw_ver from fwrelease and fwcapinfo */
/* 5.0.16p0 9.0.0.p0 is known to NOT support any mesh */
/* 5.110.22 have mesh command with 0xa3 command id */
Expand Down Expand Up @@ -870,8 +868,6 @@ int lbs_init_mesh(struct lbs_private *priv)

/* Stop meshing until interface is brought up */
lbs_mesh_config(priv, CMD_ACT_MESH_CONFIG_STOP, 1);

return ret;
}

void lbs_start_mesh(struct lbs_private *priv)
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/marvell/libertas/mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

struct net_device;

int lbs_init_mesh(struct lbs_private *priv);
void lbs_init_mesh(struct lbs_private *priv);
void lbs_start_mesh(struct lbs_private *priv);
int lbs_deinit_mesh(struct lbs_private *priv);

Expand Down

0 comments on commit 2fd5fdc

Please sign in to comment.