diff options
author | Jason Yan <yanaijie@huawei.com> | 2020-04-14 20:02:51 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-04-15 11:48:51 +0300 |
commit | 5a652b49b41b1cbffe2beedbaf253f60f768fd92 (patch) | |
tree | df4c7329a7ad20bdc1b4dbcb5e2227043c0ff965 /drivers | |
parent | e871b8bfedda84924ac5767883c80deae67a2657 (diff) |
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: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200414120251.35869-1-yanaijie@huawei.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/intel/ipw2x00/ipw2200.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c index 201a1eb0e2f6..923be3781c92 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c @@ -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); |