From patchwork Thu Nov 29 10:32:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10704317 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 B7D5E4B7E for ; Thu, 29 Nov 2018 10:32:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A52FE2EDE9 for ; Thu, 29 Nov 2018 10:32:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 995E02EE2A; Thu, 29 Nov 2018 10:32:48 +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 3EA812EE23 for ; Thu, 29 Nov 2018 10:32:48 +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: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:In-Reply-To:References: List-Owner; bh=KygafyFXuk/f3XJoQ6s0afJqxPiWDZCtJpLAsunNlMY=; b=jSs7FzQ/vEOab+ vfBVZOj2zdPwKdOgKMlbRyUI8ciWXAqxOy8v/4FeLAygd+fvIrEmyCphimB5uMooJdpstyXRjMvi3 AgjDRYbriHnN8CbxrI2jOrZBqWWz/jXWbrc71RrP9H48iLrhkHcXCKo2nWEJ06zh8/FkL/MREZ4Sc FraIlwkWIRR3YB2/K7ayX4W5JaENnr2suzsVB+RuoUod+KXdhvnfyqxyDMU7qgSd7ymABzL/FyyAz b3nwyDrmm9Dy+6WnWk3+uxs5nZnnyfCjKg7qALKFreMcGYIqguCFQIgpIwg0KzHNENiFgvABxcDY5 2mJcIJZ1MgVZJoUKWzQw==; 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 1gSJci-00053C-6S; Thu, 29 Nov 2018 10:32:44 +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 1gSJcf-00052e-5M for ath10k@lists.infradead.org; Thu, 29 Nov 2018 10:32:42 +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 wATAOWIN038769; Thu, 29 Nov 2018 10:32:28 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; s=corp-2018-07-02; bh=fAjpBQU8s5a8ne7/zi7eVjFvkFMCMlCrWe6rAjQ2RnU=; b=EpWwZwPGk5bwwtF50+HpuxfiAjtqblZOgW3fj398s3PX3QEPu5r2Xd95IPvEHWvWqbVA CZIycqV2ts2ntzr7w2wHQmEwCzJUywCPJ6+QIEBX3yW/lr9ljE7DgEGNGFkTnpxkEJs8 mKqoEmDcswilp9uF0zE3RyyeEtCc92YwnFHD+GPz95UY2CMVOgCWHgA4rDbzhV6m90Hh QAiN9jB4uneuvB4Vna5f3+08YSucaptaZar01Rf975qGAh2jxt9qCVM64ETiOMcR7mnD o7aAkKjoVdK9dD1RcyeEGb6M3B/751ROHlj/w35vuHLMzTFyzZ7Qj/Rt2uIGYdweZvzv FQ== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2120.oracle.com with ESMTP id 2nxxkqqd28-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Nov 2018 10:32:28 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wATAWMHh005399 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Nov 2018 10:32:23 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wATAWMJb013942; Thu, 29 Nov 2018 10:32:22 GMT Received: from kili.mountain (/197.157.34.169) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 29 Nov 2018 02:32:21 -0800 Date: Thu, 29 Nov 2018 13:32:14 +0300 From: Dan Carpenter To: Kalle Valo , Rakesh Pillai Subject: [PATCH] ath10k: remove an unnecessary NULL check Message-ID: <20181129103214.5tudci6izlfaasqx@kili.mountain> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: NeoMutt/20170113 (1.7.2) 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-1811290091 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181129_023241_325702_2F1CD80E X-CRM114-Status: GOOD ( 16.03 ) 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: 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 --- 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));