From patchwork Tue Jun 23 19:04:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John W. Linville" X-Patchwork-Id: 6662731 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 2C5729F1C1 for ; Tue, 23 Jun 2015 19:15:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 609FD2063C for ; Tue, 23 Jun 2015 19:15:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4497A2062D for ; Tue, 23 Jun 2015 19:15:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752298AbbFWTPT (ORCPT ); Tue, 23 Jun 2015 15:15:19 -0400 Received: from charlotte.tuxdriver.com ([70.61.120.58]:52755 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751791AbbFWTPR (ORCPT ); Tue, 23 Jun 2015 15:15:17 -0400 Received: from uucp by smtp.tuxdriver.com with local-rmail (Exim 4.63) (envelope-from ) id 1Z7Tf4-0005cK-Th; Tue, 23 Jun 2015 15:15:11 -0400 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.14.9/8.14.6) with ESMTP id t5NJ46Mn010473; Tue, 23 Jun 2015 15:04:06 -0400 Received: (from linville@localhost) by localhost.localdomain (8.14.9/8.14.9/Submit) id t5NJ45OF010472; Tue, 23 Jun 2015 15:04:05 -0400 From: "John W. Linville" To: linux-wireless@vger.kernel.org Cc: Amitkumar Karwar , Avinash Patil , Kalle Valo , "John W. Linville" Subject: [PATCH] mwifiex: do not short circuit exit from mwifiex_set_mgmt_ies Date: Tue, 23 Jun 2015 15:04:03 -0400 Message-Id: <1435086243-10433-1-git-send-email-linville@tuxdriver.com> X-Mailer: git-send-email 2.1.0 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, 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 Without this change, the code simply exits after calling mwifiex_uap_set_head_tail_ies, leving the call to mwifiex_set_mgmt_beacon_data_ies as dead code. Coverity CID #1271292 Signed-off-by: John W. Linville Acked-by: Amitkumar Karwar --- drivers/net/wireless/mwifiex/ie.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/mwifiex/ie.c b/drivers/net/wireless/mwifiex/ie.c index 0ba894509413..23e368c77c08 100644 --- a/drivers/net/wireless/mwifiex/ie.c +++ b/drivers/net/wireless/mwifiex/ie.c @@ -409,6 +409,8 @@ int mwifiex_set_mgmt_ies(struct mwifiex_private *priv, int ret; ret = mwifiex_uap_parse_tail_ies(priv, info); + + if (ret) return ret; return mwifiex_set_mgmt_beacon_data_ies(priv, info);