From patchwork Tue Jun 25 04:13:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karthikeyan periyasamy X-Patchwork-Id: 11014651 X-Patchwork-Delegate: kvalo@adurom.com 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 7464D13AF for ; Tue, 25 Jun 2019 04:13:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65D9F28A38 for ; Tue, 25 Jun 2019 04:13:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59E3B28A9C; Tue, 25 Jun 2019 04:13:49 +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 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 0D81528A38 for ; Tue, 25 Jun 2019 04:13: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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=1z8MfqLgJiyhgx5wOfq4p+8xdFZEwHd+0K8njDrw8wA=; b=gT5WzCmO45/zsdQgE0TNdbZmhG 9/GEWzYTRpjZSELrA1iqa6lQsaCzCRWRKb/iaZzRoyuXH4CATAxNFFTKfj2MMR7jKAnA5VyKPteCb ixEyxwm0e68jrd9SILcCg4/jC/LYcCmnwcwNYn8SWGI0tykpwstEwbeBfC3Tn7AqYxzchmIoyaNsQ p2kI/mTeFjq8+9MvGmFg8aMfWav3DdiU7BMYK68om5MlzLiSiM53tJKbLOn9W78+fr3PnafofYbuf 0B3dOnNThGYDYYefgwOWPGokDm7X48P8QcjsOFQMk7OR2JAbpOxLHHfBjC8+RBA1uvFBUrv3/Wgue 0iARyakA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hfcq4-0003GY-3F; Tue, 25 Jun 2019 04:13:48 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hfcq2-0003Fa-34 for ath11k@lists.infradead.org; Tue, 25 Jun 2019 04:13:47 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id CD81F602F8; Tue, 25 Jun 2019 04:13:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1561436025; bh=po1DqxVLoE8ORpNvCV8QiT+Hi7nM8ad6fE4iNpFCPjs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BBFucnAduiiPOQKddjI6PVnuUbp9hqe66I/8l1Yjb1cmAmvNfCUj6nDfDIloELxMG 3TEqsi2I+i/mUW5NivNGmfIRUIYd3BfxY0EMkJdYL77U9nSXr4wqe34XWRyPa4g2o5 nPUIDSPX4xCLLe1ePzLSnsUIUkJcmH19uwDfEVZg= Received: from CHECSTP284781-LIN.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: periyasa@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 524E0602F8; Tue, 25 Jun 2019 04:13:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1561436025; bh=po1DqxVLoE8ORpNvCV8QiT+Hi7nM8ad6fE4iNpFCPjs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BBFucnAduiiPOQKddjI6PVnuUbp9hqe66I/8l1Yjb1cmAmvNfCUj6nDfDIloELxMG 3TEqsi2I+i/mUW5NivNGmfIRUIYd3BfxY0EMkJdYL77U9nSXr4wqe34XWRyPa4g2o5 nPUIDSPX4xCLLe1ePzLSnsUIUkJcmH19uwDfEVZg= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 524E0602F8 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=periyasa@codeaurora.org From: Karthikeyan Periyasamy To: ath11k@lists.infradead.org Subject: [PATCH 2/5] ath11k: avoid unnecessary 'out of memory' message Date: Tue, 25 Jun 2019 09:43:16 +0530 Message-Id: <1561435999-28316-2-git-send-email-periyasa@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1561435999-28316-1-git-send-email-periyasa@codeaurora.org> References: <1561435999-28316-1-git-send-email-periyasa@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190624_211346_147268_B597687F X-CRM114-Status: UNSURE ( 9.91 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Karthikeyan Periyasamy MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP drivers/net/wireless/ath/ath11k/dp_rx.c:573: Possible unnecessary 'out of memory' message drivers/net/wireless/ath/ath11k/wmi.c:4528: Possible unnecessary 'out of memory' message Signed-off-by: Karthikeyan Periyasamy --- drivers/net/wireless/ath/ath11k/dp_rx.c | 4 +--- drivers/net/wireless/ath/ath11k/wmi.c | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index afe8399..17be3cc 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -569,10 +569,8 @@ static void ath11k_dp_rx_tid_del_func(struct ath11k_dp *dp, void *ctx, } elem = kzalloc(sizeof(*elem), GFP_ATOMIC); - if (!elem) { - ath11k_warn(ab, "failed to allocate memory for cache flush element\n"); + if (!elem) goto free_desc; - } elem->ts = jiffies; memcpy(&elem->data, rx_tid, sizeof(*rx_tid)); diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c index f800c77..085ee32 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -4527,9 +4527,7 @@ static int ath11k_reg_chan_list_event(struct ath11k_base *ab, u8 *evt_buf, u32 l struct ath11k *ar; reg_info = kzalloc(sizeof(*reg_info), GFP_ATOMIC); - if (!reg_info) { - ath11k_warn(ab, "Unable to allocate memory for processing chan_info event\n"); ret = -ENOMEM; goto fallback; }