From patchwork Thu Nov 29 14:24:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10704623 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7C606109C for ; Thu, 29 Nov 2018 14:24:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B3C82C2C6 for ; Thu, 29 Nov 2018 14:24:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FA8128B8F; Thu, 29 Nov 2018 14:24:34 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0BEAC2C2C6 for ; Thu, 29 Nov 2018 14:24:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=DpNv44v0HUursWJy9SiV9ERWlFDW4fcLikAAukn0neA=; b=QCUfAXTxbwklfY Kyx5WwhDB6Yb/BbBkrG7UU0y26xZrrZl/tt9hOiFQSQtcADwWH9s5fe4NSq4kG6hQWU6Pmhn3HWHs ZR9eC+7hIgqL82/J8EYD+iWR+emftXsO5z3cJGgCy3iZzNmHs0WuzRioTpC76EfVSKsF79nsa4eSU abUSW3RPCNb2h8sdSUi1aozM+DmjC1GcB0k8nsiALNJdr3Zb7tPVfMNy71fTSetECuCuTJE87Fxny MG4zZm2UlJbjbJVR2HtIIhRg57DkZnNPgGLdJtX0c1/zjB5Y8tTHb+ltFj5GXyyGktqwpaYB8uLCB nozDQWaG282awlofWATg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSNF2-0001mT-2A; Thu, 29 Nov 2018 14:24:32 +0000 Received: from aserp2120.oracle.com ([141.146.126.78]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSNEy-0001m5-HJ for ath10k@lists.infradead.org; Thu, 29 Nov 2018 14:24:29 +0000 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wATEOBTP032010; Thu, 29 Nov 2018 14:24:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=z0HMQ0FMaiN2gG5w3fbStGaOhBIrOhoBtrax2U450G0=; b=uRkjh+oPkStMRA7zIDEXTONqU+LXu4K0US09zQZUex5NiopRI4iAU5W1scwNRXM0ITwR Cu9ucqztsgCqMFfvBaHdyMalr/FaG2EcH6kWI8xtWRr3ovWuuUQaHG21K8YOTcmafA/k zY8lJrJDlAZMJrK+heBTz9yi5ZNqkbkhwKnXx6PzrBI2zqcQ5+q/rXhPYUL5eZ6MlJ2a gVv7CqjF/5mV3cl6jOozr2SNmMqVjEwNxZ1rB/kf1N2orlBl8ILt0Ob3O5kbvGQWAjtI XSItAimq6DLqkkTwMoe2uZKV7GaiOR8w+EinT62LkQdHsVywL/ebfvJ+N4G5Y+JBM4xV Ew== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2120.oracle.com with ESMTP id 2nxxkqre0d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Nov 2018 14:24:15 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wATEOFLg010832 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Nov 2018 14:24:15 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wATEOEhZ030754; Thu, 29 Nov 2018 14:24:14 GMT Received: from unbuntlaptop (/197.157.34.169) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 29 Nov 2018 06:24:13 -0800 Date: Thu, 29 Nov 2018 17:24:06 +0300 From: Dan Carpenter To: Kalle Valo , Rakesh Pillai Subject: [PATCH] ath10k: remove an unnecessary NULL check Message-ID: <20181129142406.GV3073@unbuntlaptop> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20181129103214.5tudci6izlfaasqx@kili.mountain> X-Mailer: git-send-email haha only kidding User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9091 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811290121 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181129_062428_663458_6A8599F3 X-CRM114-Status: GOOD ( 17.55 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org, ath10k@lists.infradead.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The "survey" pointer is the address of an array element. We know that it can't be NULL so this check can be removed. Signed-off-by: Dan Carpenter --- Resending with linux-wireless Cc for patchwork. drivers/net/wireless/ath/ath10k/wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 659513bf4ddc..6a04727b63ce 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -2578,7 +2578,7 @@ static void ath10k_wmi_event_chan_info_unpaired(struct ath10k *ar, survey = &ar->survey[idx]; - if (!params->mac_clk_mhz || !survey) + if (!params->mac_clk_mhz) return; memset(survey, 0, sizeof(*survey));