From patchwork Tue May 17 22:30:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 9115441 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 82BE49F30C for ; Tue, 17 May 2016 22:31:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8BD932010E for ; Tue, 17 May 2016 22:31:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C1884200DC for ; Tue, 17 May 2016 22:31:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751969AbcEQWa7 (ORCPT ); Tue, 17 May 2016 18:30:59 -0400 Received: from mout.gmx.net ([212.227.15.18]:58766 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751895AbcEQWa6 (ORCPT ); Tue, 17 May 2016 18:30:58 -0400 Received: from LT001.lan ([62.143.92.134]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0M6SJX-1bm4V10p0F-00yRdN; Wed, 18 May 2016 00:30:48 +0200 From: Heinrich Schuchardt To: Kalle Valo Cc: Nicholas Mc Guire , Johannes Berg , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Heinrich Schuchardt Subject: [PATCH 1/1] net: rsi: eliminate superfluous NULL check Date: Wed, 18 May 2016 00:30:41 +0200 Message-Id: <1463524241-11351-1-git-send-email-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.1.4 X-Provags-ID: V03:K0:XYo2qQxhuMtMJOJEdWDZD5CPmKL2TCSytcVDwpFMBV7xEPrboCG 1c3kKbZhwqKMdpvhqDHsgmppji205R6Debw57hHz8JqApfgrQIwtBiBlURB2itSMUYqMilk 3n+3aIYh3LjLTHIiSbgkKC92vgqUq8610p5bpjCftzTuLGuIlhDY/2dquFGAg8Y7r0gV1t0 PjyoqmK2doNYnxF5d09wQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:FqjF9pbZpTU=:/9fsPdrxTLGcuY5JuZRG7w G137b8VyIIlGLD6I6hwfvTIUQ1BMhv/ey3f/atlMNCVGx8a5n+b1WOabkdGAziOVRpG01/wSD oWRcjp9fbuIgoR57w0dS/4vhFsLRvH4S4YMZT3FHMLy2QBr3NCbgtjTG63G7I/T2snO4Ll6X5 8VpBMpkuRdl9eQY2wDN0K55sIjHso+6GLp0yLIRDi8Te8IczxIW4ODjbglafrPctWOIpK/V2S wsbZUC3NdFyv4N5+t1TNWAcl3FRFIyH0N7IrPlhMECikA2GQCqEoOIFRlGBeeui3YekBSCixZ ybYGaCpQ1GYiibN0cbHkul5ZysBCw94lvQo9++UhHx/NUMA/QOy8o4IQIcDN1DviT3F/4xw2i AsILpI9lH+qob24c36qPOzSzj5P+1CkhHW0UrwO6a912PPeHhTzXpVJElzD/ctdjq7ioTuAxM gm5oNjtSOUiXYoE08NDVapNkwTsYt5E4/TcXpjGj2UVN4eeaRuwEInkp4KZ3CBv0mQ42yxuLm xj22sEQKYUQpR63k+2GKMn5sBqM2k36Q03CTuzdwj00nHNDGVgzVa04xI3xKLb2HS2hjo9VSY 3DvrkukASIeHAkQ2q1qUI4jZz2NpalAtmuLgyb0TRmL8oE2bI1hvMpizRhHaAqAqCZzgpQrOD enCLOcmXyUzg/rXWf6Ta9PbrSJk/q/6BPrui3xW1XvsjSF3+ywzSKVfKjH8spBVwxpG6tE9Mw EcbTd9VWiUWfyzlyWX0aISstVc2gDDvCBNaIecPFtjViZ6Bob+2Ne5XdWWk= Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP msg is dereferenced before checking against NULL, e.g. when assigning pad_bytes. Remove the superfluous check in function rsi_mgmt_pkt_to_core. Signed-off-by: Heinrich Schuchardt --- drivers/net/wireless/rsi/rsi_91x_mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c index 40658b6..35c14cc 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c +++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c @@ -398,7 +398,7 @@ static int rsi_mgmt_pkt_to_core(struct rsi_common *common, return -ENOLINK; msg_len -= pad_bytes; - if ((msg_len <= 0) || (!msg)) { + if (msg_len <= 0) { rsi_dbg(MGMT_RX_ZONE, "%s: Invalid rx msg of len = %d\n", __func__, msg_len);