Commit 5a652b49 authored by Jason Yan's avatar Jason Yan Committed by Kalle Valo

ipw2x00: make ipw_setup_deferred_work() void

This function actually needs no return value. So remove the unneeded
variable 'ret' and make it void.

This also fixes the following coccicheck warning:

drivers/net/wireless/intel/ipw2x00/ipw2200.c:10648:5-8: Unneeded
variable: "ret". Return "0" on line 10684
Signed-off-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200414120251.35869-1-yanaijie@huawei.com
parent e871b8bf
......@@ -10640,10 +10640,8 @@ static void ipw_bg_link_down(struct work_struct *work)
mutex_unlock(&priv->mutex);
}
static int ipw_setup_deferred_work(struct ipw_priv *priv)
static void ipw_setup_deferred_work(struct ipw_priv *priv)
{
int ret = 0;
init_waitqueue_head(&priv->wait_command_queue);
init_waitqueue_head(&priv->wait_state);
......@@ -10677,8 +10675,6 @@ static int ipw_setup_deferred_work(struct ipw_priv *priv)
tasklet_init(&priv->irq_tasklet,
ipw_irq_tasklet, (unsigned long)priv);
return ret;
}
static void shim__set_security(struct net_device *dev,
......@@ -11659,11 +11655,7 @@ static int ipw_pci_probe(struct pci_dev *pdev,
IPW_DEBUG_INFO("pci_resource_len = 0x%08x\n", length);
IPW_DEBUG_INFO("pci_resource_base = %p\n", base);
err = ipw_setup_deferred_work(priv);
if (err) {
IPW_ERROR("Unable to setup deferred work\n");
goto out_iounmap;
}
ipw_setup_deferred_work(priv);
ipw_sw_reset(priv, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment