From patchwork Tue Sep 7 10:46:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 507824 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 848C3C433EF for ; Tue, 7 Sep 2021 10:47:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 690A2610F8 for ; Tue, 7 Sep 2021 10:47:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245327AbhIGKsH (ORCPT ); Tue, 7 Sep 2021 06:48:07 -0400 Received: from smtp-relay-canonical-0.canonical.com ([185.125.188.120]:54950 "EHLO smtp-relay-canonical-0.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244744AbhIGKsG (ORCPT ); Tue, 7 Sep 2021 06:48:06 -0400 Received: from localhost (1.general.cking.uk.vpn [10.172.193.212]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id C2CE94017C; Tue, 7 Sep 2021 10:46:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1631011618; bh=fX1N3TOwZMxrjPJFX3uSNd2JDuJSiQ0i8IY9scgNe1k=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=JrlWUbgVLY2tqzUxKRhjSIHz19gPT1essAZw/2RXf4i+t6cfwtRTl1RP6z4H+cr9H OmWsVdcqeo+TYRK7puMWmnNLNjT4/lTI2NeUnbpe+Trf1EfWqIP14FvcRTRHpmR0/n FsBwV6l3p/x280hMSizkX3pa2K6cm/dWozO30y4CVZ5Ujv+sB6LNRW/tHv57Su+iKU E/nPzPavrxOxhWIXoqMtSpJLhYe7Tv1vwOT2Iy1F3u+CzPhJ1Akp+lcXrasQcbY/gX 2TJ4fZGW7GVaYQGENY1ysE9d8A1j7SfDN1CAHT2OFq4NhOP498CFAeUCZajITdWz1/ S0PklCe4WiwQA== From: Colin King To: Luca Coelho , Kalle Valo , "David S . Miller" , Jakub Kicinski , Wey-Yi Guy , "John W . Linville" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] iwlwifi: Fix -EIO error code that is never returned Date: Tue, 7 Sep 2021 11:46:58 +0100 Message-Id: <20210907104658.14706-1-colin.king@canonical.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Colin Ian King Currently the error -EIO is being assinged to variable ret when the READY_BIT is not set but the function iwlagn_mac_start returns 0 rather than ret. Fix this by returning ret instead of 0. Addresses-Coverity: ("Unused value") Fixes: 7335613ae27a ("iwlwifi: move all mac80211 related functions to one place") Signed-off-by: Colin Ian King --- drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c index 75e7665773c5..90fe4adca492 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c @@ -304,7 +304,7 @@ static int iwlagn_mac_start(struct ieee80211_hw *hw) priv->is_open = 1; IWL_DEBUG_MAC80211(priv, "leave\n"); - return 0; + return ret; } static void iwlagn_mac_stop(struct ieee80211_hw *hw)