From patchwork Sun Jul 31 12:11:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 9253367 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 E55556048F for ; Sun, 31 Jul 2016 12:12:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D56CB2843C for ; Sun, 31 Jul 2016 12:12:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C783C28468; Sun, 31 Jul 2016 12:12:25 +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=-6.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI 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 52D0C2843C for ; Sun, 31 Jul 2016 12:12:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753006AbcGaMMD (ORCPT ); Sun, 31 Jul 2016 08:12:03 -0400 Received: from mout.gmx.net ([212.227.15.18]:52841 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752666AbcGaMMB (ORCPT ); Sun, 31 Jul 2016 08:12:01 -0400 Received: from LT002.fritz.box ([109.91.48.91]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0Lugbo-1bKn321R68-00zr9k; Sun, 31 Jul 2016 14:11:28 +0200 From: Heinrich Schuchardt To: Amitkumar Karwar , Nishant Sarmukadam , Kalle Valo Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Heinrich Schuchardt Subject: [PATCH 1/1] mwifiex: key_material_v2 remove superfluous condition Date: Sun, 31 Jul 2016 14:11:21 +0200 Message-Id: <1469967081-3937-1-git-send-email-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.8.1 In-Reply-To: <877fc2816w.fsf@purkki.adurom.net> References: <877fc2816w.fsf@purkki.adurom.net> X-Provags-ID: V03:K0:GE7q2ZPsgQFBTCErZfSVAJSulrVO0yCM6rhFbFQEXRgwPxJwyuO XlZbD6uX2bsoS+f5U5e2xx/0Brgzqfj+phEO/McLVdrtBCJlQhMuS0+nJQbO7Wt8m/Tq+oE hzhVU6GHvS+gqGhXr2IIyE+KI3yJbwxQ1r9/QouJNl6tlbVQa0zbVRvHXnaSGfh3+aZTcNL LAKUthtZTBwaR2P4vFm7A== X-UI-Out-Filterresults: notjunk:1; V01:K0:hsmYimjDHl4=:hfsxIEqgn+4vNUgYjuUmxU 2sU2Ps5T3GQUPbA+Dfq/RQBBSKEpTGodI81N1lqkapwmEdmGeNPXchMDY3r2oFHMGC42Y33Qe 5aru3fHYnDRdaCGQaDrf8s7mKlET1luDS1gCKGVeWCmXkHsSp/IsdrGoypgAMO+fNhSxLCqgx gfQhkpZ1S5BtBe4pDbD6OkXWFzV05V/JEXeL7o61VXoYzjwCgnnCSpAP4yCFgxgRBHr6QeWmR JGttnYmUK8CVk60hiLiruvFSk64yUdjSCwoB3dVGX9fgQK/uhAaWfm6DL4G0E3RspZR245CNN IntBfDMUEG66S8giy2aCXgZGNdxP7DLSQA/4epzgHwZVZtMfaCAjmlModH+6V0/vSiJHX1OM/ X8BJ9iGhgZ01YBljA2hjwD5NwlhTLxb+Vyhza5Me6AFHVATanHahkhcTvqRNEVnKOj/YGyQQ7 OLPVQFM01hI+3XSVOh8l6rlHQVigMxU5yEXSuH1/FZUg2mlQK0Kqv51bqeZc80HUzSxpFBvJR J9yJHywTUCJkdBrKiG9jI40tz1OkbidpXNdvcUvnDdX5ZohrbGW9oRzFM/oMaShm+9LRjDJjc 3l30Yhcopr/1VL/0WblxElRKdL3fYRP5m3fMUudzQTS4KUh9AoFBfi01lWtEYEryzm3jF1eBA oHDOsiMp/Vr5PP4+BciXcgUjqGVU069wq4SIge5a8PNGWmHsgJVjSitEBpSjH1ybsyhObnPHC SilOdEefvvZf5CiozwPsftJZwGcVXT5mMwzjJ9OuTjSxfzgr2TSJhUImyrA= 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 We are using mac as source address in a memcpy. In the lines below we can assume mac is not NULL. Signed-off-by: Heinrich Schuchardt Acked-by: Amitkumar Karwar --- drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c index 128add8..0d4f9fe 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c @@ -706,15 +706,10 @@ mwifiex_cmd_802_11_key_material_v2(struct mwifiex_private *priv, (priv->wep_key_curr_index & KEY_INDEX_MASK)) key_info |= KEY_DEFAULT; } else { - if (mac) { - if (is_broadcast_ether_addr(mac)) - key_info |= KEY_MCAST; - else - key_info |= KEY_UNICAST | - KEY_DEFAULT; - } else { + if (is_broadcast_ether_addr(mac)) key_info |= KEY_MCAST; - } + else + key_info |= KEY_UNICAST | KEY_DEFAULT; } } km->key_param_set.key_info = cpu_to_le16(key_info);