From patchwork Mon Jul 27 19:22:15 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: 6876141 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 6F6349F358 for ; Mon, 27 Jul 2015 19:30:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9659220711 for ; Mon, 27 Jul 2015 19:30:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8C4E12070E for ; Mon, 27 Jul 2015 19:30:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752701AbbG0TaU (ORCPT ); Mon, 27 Jul 2015 15:30:20 -0400 Received: from charlotte.tuxdriver.com ([70.61.120.58]:51465 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750915AbbG0TaU (ORCPT ); Mon, 27 Jul 2015 15:30:20 -0400 Received: from uucp by smtp.tuxdriver.com with local-rmail (Exim 4.63) (envelope-from ) id 1ZJo6F-0006Nz-2J; Mon, 27 Jul 2015 15:30:11 -0400 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.15.1/8.14.6) with ESMTP id t6RJMIqT003988; Mon, 27 Jul 2015 15:22:18 -0400 Received: (from linville@localhost) by localhost.localdomain (8.15.1/8.15.1/Submit) id t6RJMGVY003987; Mon, 27 Jul 2015 15:22:16 -0400 From: "John W. Linville" To: linux-wireless@vger.kernel.org Cc: ath10k@lists.infradead.org, Kalle Valo , "John W. Linville" Subject: [PATCH] ath10k: remove NULL ptr deref in variable init of ath10k_monitor_vdev_start Date: Mon, 27 Jul 2015 15:22:15 -0400 Message-Id: <1438024935-3946-1-git-send-email-linville@tuxdriver.com> X-Mailer: git-send-email 2.4.3 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.2 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 In ath10k_monitor_vdev_start, chandef is initialized to NULL and then channel is immediately thereafter initialized to chandef->chan (i.e. NULL->chan). This appears to be some sort of cut-n-paste error, since the same assignment is done later (i.e. after chandef has been properly assigned to a non-NULL value). So, let's just remove this "brown paper bag" typo/thinko... :-) Coverity CID #1309505 Signed-off-by: John W. Linville --- drivers/net/wireless/ath/ath10k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index c9a7d5b5dffc..2823222dea92 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -836,7 +836,7 @@ static inline int ath10k_vdev_setup_sync(struct ath10k *ar) static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id) { struct cfg80211_chan_def *chandef = NULL; - struct ieee80211_channel *channel = chandef->chan; + struct ieee80211_channel *channel; struct wmi_vdev_start_request_arg arg = {}; int ret = 0;