Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp579157ybz; Wed, 15 Apr 2020 14:26:34 -0700 (PDT) X-Google-Smtp-Source: APiQypKrgyj6u6LIBuxIqZpEMPOpU66YKRJaBGUie9pCttZeZzVDNo7knRYENd+IvH+3GT9L1HKb X-Received: by 2002:a17:906:5e50:: with SMTP id b16mr2374503eju.331.1586985994032; Wed, 15 Apr 2020 14:26:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586985994; cv=none; d=google.com; s=arc-20160816; b=DO2KW7g50aNrA8P1fWiLcIn1ATdBpVcuK+0gDH8qIzXjhqcYBdjF0blmPpNhuQLrMK Ti6roz8JQI2pdrDCtZ2jkihmf/mM9174MJX8xri6rW+LK6lw1iZqnk7sd6YSAoHbVB/8 LCGDYldsjc69QWpUt+OtlEiwFw2KJXPldpgqTpKRVSlUTu6m7+ArEtaLMeU/7Adfb0e/ R8OeEvMxKSN/hwzmBtMKsBHaAzzZ970EbT467rgPtGpSsqZcnyAsMfcQEdTLTodGe6s3 cv0bzo+g53194zkME/yZHBVT/uybFc1CjktE7DgRs96niHa6DZpKhDWpwhu1kPjOKzs+ 9PVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=kC2cC5lKDcYjsDXv/v5D2ewbtGhOpkP4XiJHNCsTrpU=; b=hnYKVdJG4uRjm6dDdGFdsQ8x15NNtlhQczJHbCP1X1sKTBxKTHZQkLVHR9i1l46KYL TLW3AuCPKHi4XHPyUKxLth5WfsQdtEJbZegZlSxkLSB1N95Xfb9CDD10dLP9kirlYr6K rMpBStFN/SFIjm+Xp8Zr+9Ag4Dfu4W3He/gKdzQ13y2ALhmqpN9+XIPYEpgY3Cfd92a6 nik0goYW8jEmUx3m7lwM+8qRePFFSpG1hI4pohqIsKMpk0r/FULO5MY4+hQBnuVdAdcj 7eur6JAFpeF3C9+yM8ili5k44JBuQISmvtTYRc3fMzOwWB8p8daVKJY4YoWFig+hpUmf Vhgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e2si11008504edy.55.2020.04.15.14.26.10; Wed, 15 Apr 2020 14:26:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439372AbgDNLgn (ORCPT + 99 others); Tue, 14 Apr 2020 07:36:43 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:52800 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2439325AbgDNLgg (ORCPT ); Tue, 14 Apr 2020 07:36:36 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id D8BDFF2A221BDC373A7D; Tue, 14 Apr 2020 19:36:30 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Tue, 14 Apr 2020 19:36:24 +0800 From: Jason Yan To: , , , , , CC: Jason Yan Subject: [PATCH] ipw2x00: make ipw_setup_deferred_work() void Date: Tue, 14 Apr 2020 20:02:51 +0800 Message-ID: <20200414120251.35869-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 12 ++---------- 1 file 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); -- 2.21.1