From patchwork Sun Jul 31 10:39:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 9253329 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 B37686048F for ; Sun, 31 Jul 2016 10:40:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A2B7D28346 for ; Sun, 31 Jul 2016 10:40:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9406B28408; Sun, 31 Jul 2016 10:40:04 +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 6EE2828346 for ; Sun, 31 Jul 2016 10:40:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753247AbcGaKjg (ORCPT ); Sun, 31 Jul 2016 06:39:36 -0400 Received: from mout.gmx.net ([212.227.15.15]:60033 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750748AbcGaKje (ORCPT ); Sun, 31 Jul 2016 06:39:34 -0400 Received: from LT002.fritz.box ([109.91.48.91]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0Lg0sd-1awyVW2ifj-00pgjf; Sun, 31 Jul 2016 12:39:21 +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: remove superfluous condition Date: Sun, 31 Jul 2016 12:39:15 +0200 Message-Id: <1469961555-2123-1-git-send-email-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.8.1 X-Provags-ID: V03:K0:CsBl1tCBqGZgcn9h4j5KVMj6X5TeYzgVUvHVrbo9t7E3QUeMuuf a7KMsEhyPARfDQqlCZK7BYHZOqajTKRVuk5mrwIMa6Vo1LkWTmxAlxX+tTaBO5XM3O0cohT CQByP6Xe/suncTIDmrNWaGYsm4FaR+EwSRFaGXT5T5yik8+MMvdct4vLepisEweIUQrlJgJ Nb2paJY1RV5YsUGdE4JxA== X-UI-Out-Filterresults: notjunk:1; V01:K0:ya9i/x5f8+M=:YFeVIhM4oHpbQHnNVox1VS cGuB+x8K9L/5SyenGyAAMwSjXpI5UZtDmWKYP4lLQ40fRv1FUO5dSg5cVfqZZVLJCdGcbevbJ K3SKZ84jl3D9o/vXiREkyHgz2nl4blckJ/pD6ETiSY6tdOGJDap29KeTcdLFT2Zks2iY0ErzU t+C5y6CYM+rCWwTWRPBwYKaEdkb88+Pg6fP5AgmgkaSy/CF4tFORwEj32FUBBPCcVphcYqLHN ds0mAT9qT1eZBhavQdUr9OuJhpXxs4KG0U1FC89x3UP+pEagaFHK/ZrWa5Y7B77r4GDu9LAyy h6GE9Eq2+vD2cq7r5uSZF2N2YFu7fP9Rk5feFjQ+CDrMfdIm7auGy2KGoYuNPP12Xxe12domD GrgH1LHKb3Q4dhX8G6Byj8hKsNLak43p+eLFE0GDOLjkCp/bDEUaqtxzP+aeMxNF92BzZIvYO IcYD7FbYdlkdQM2YsZkeVKkdFqHdoCtEiS/eLUojMxq0nVH1XcJrkOPko+dKqBbSRRA4zqOQl nimb/QEJLOfiSla/bX4zANGZ/PfF/4E5TsRkz8ucUT/I+LnjRLPKsEqENmhXcOnIwzQepVCvf VALdhDPAO8fu2I1i9/NBO6n0/V6uz2FXjGcN4aYEVQ1lfKdUgZiYCZYJ2dIMW8SuOFojjQf6v FoHd0nodJkfRCApbPQQweSk7YVRh5Pg0Ov7n/HdHa+uE1yU68jEKXlBZcWmkrhHFx2Wec3JBu IkFOVi7J4mJ82L2aJX/7pRhSFiszwdyMDbWHim/X978653QYAjZDPVx4DtM= 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 for_each_property_of_node is only executed if the property prop is not NULL. Signed-off-by: Heinrich Schuchardt Acked-by: Amitkumar Karwar --- drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c index 7897037..128add8 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c @@ -1482,7 +1482,7 @@ int mwifiex_dnld_dt_cfgdata(struct mwifiex_private *priv, continue; /* property header is 6 bytes, data must fit in cmd buffer */ - if (prop && prop->value && prop->length > 6 && + if (prop->value && prop->length > 6 && prop->length <= MWIFIEX_SIZE_OF_CMD_BUFFER - S_DS_GEN) { ret = mwifiex_send_cmd(priv, HostCmd_CMD_CFG_DATA, HostCmd_ACT_GEN_SET, 0,