From patchwork Fri Apr 27 11:21:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10368175 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A8558602DC for ; Fri, 27 Apr 2018 11:21:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 977CB28945 for ; Fri, 27 Apr 2018 11:21:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C1B729377; Fri, 27 Apr 2018 11:21:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 261C328945 for ; Fri, 27 Apr 2018 11:21:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751792AbeD0LV5 (ORCPT ); Fri, 27 Apr 2018 07:21:57 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:58246 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751291AbeD0LVz (ORCPT ); Fri, 27 Apr 2018 07:21:55 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w3RBGGip003023; Fri, 27 Apr 2018 11:21:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2017-10-26; bh=xcToAFiiOqAwmWWD80DPOAkN9JGT2AX++Yz+oeVIxOU=; b=FD87FmWzP3hp7My078alfyvdIO/EoDGCDO7T3lTqurX9zn5Gz3R4iGIvnqPFeEw2VxBw K4TyxMpkjyP90jMkCc4braQ27PXK5ptuJkaqGlftN08D7O5A4UNlVQc6pH+r7lePHChT MP8itZ9o6DKAQxzKi6D+F5MP1UzrJPcNbRJ1FQODdPnD+/UCIXAQqbh6uNhmZYfICSBQ zeXAtQ+W+UmgUfr7/QCUP0nVmE2o0R6SzrAqQ1hkzqsxD08VSEiLBELRidaiAKygR2zE lIQpu+Pdt3GBg3DmC3lk+iwhp29ZUNDjUM9VkOq9iRVFqovroV7loVCfyJPQI3pmwpGe og== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2130.oracle.com with ESMTP id 2hfttyf6sj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 27 Apr 2018 11:21:46 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w3RBLjtB022843 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 27 Apr 2018 11:21:45 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w3RBLiNl028014; Fri, 27 Apr 2018 11:21:45 GMT Received: from mwanda (/197.254.35.146) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 27 Apr 2018 04:21:44 -0700 Date: Fri, 27 Apr 2018 14:21:30 +0300 From: Dan Carpenter To: Kalle Valo , Prameela Rani Garnepudi Cc: Amitkumar Karwar , Karun Eagalapati , Siva Rebbagondla , linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] rsi: fix a bug in rsi_hal_key_config() Message-ID: <20180427112130.GA27655@mwanda> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8875 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804270110 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Smatch complains that the end of this function is dead code. I'm pretty sure that this return needs to be changed to only return on error. Fixes: 4fd6c4762f37 ("rsi: roaming enhancements") Signed-off-by: Dan Carpenter diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c index 766d874cc6e2..80e7f4f4f188 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c +++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c @@ -911,14 +911,14 @@ static int rsi_hal_key_config(struct ieee80211_hw *hw, } } - return rsi_hal_load_key(adapter->priv, - key->key, - key->keylen, - key_type, - key->keyidx, - key->cipher, - sta_id, - vif); + status = rsi_hal_load_key(adapter->priv, + key->key, + key->keylen, + key_type, + key->keyidx, + key->cipher, + sta_id, + vif); if (status) return status;