Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp109687ybg; Mon, 8 Jun 2020 17:52:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrmZQeEC/Y1nLyD+Gm2GJ6AdxrtJLdBgrxzzx29aAm2PdJTnJCxjbUcoWsXCHBF1C5mTal X-Received: by 2002:aa7:d7ca:: with SMTP id e10mr24989199eds.45.1591663952496; Mon, 08 Jun 2020 17:52:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591663952; cv=none; d=google.com; s=arc-20160816; b=mPIQCjKfds4RQdIjvro3lWGf4G++U3/p31E36BCqNOB5orSMrMRgfZWS1e+vdVWoi3 8SrkbQBiSQHFhfRrpBJ/MHK35nRAwj1hxbeDJ4JW+z45M637szUV4ofvlI+SDzChAKQx s03XJsyj4SaAmmlVp+s2zdX10lNgIhST1NcAqKNaMIEj9xEAAp8l6E9O42RsWRHpF4FE 0UL/n/GmSm5scTttzgenvpyut7FHgUmKUL9GkwHQ7hR31rHOEQw0GxN8PQUsm7ALPiLU kSmjDcQvlhzAEZ2YZ+jGhbaa1iqOzpTSXggemHNSBmZaxGgVfiSUcKu6CLOR9hcT2v32 du4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TzvIT7M7eAJrdKGsZZlxb1dLFnld5noSHdm6ewnAbJk=; b=IrmKwCsUs3myciD0FwAuAL4pjFAGRfmNu7LEVwc0zOMfctkaasnmlChhzXhU9bOEMB ei3JsNKzLA4dV7m+d/nJYtB3O1UuUTaHrpKBAwDXiZ/15AilJBz6230zVwRLUgFTMwiz ZV50F6SHSQH1wLOFZ1yQ1Woi+hlP6cp3ELLQgD0NDyfrRkXsy3LjfWmg8E+UySyosRTd ciQ3OmoRio6tf+GDEpl8vyACJwfLpbJleOku5gDyBWSZ7iucuYuFSxb7JTvJa7noOp3e JkgtG9Niy6lviAeFF9fy9FGrRNbIc3TWepPU2S9y/ZZR/0OzpNgcABz/f65VvBsEUNMv RwKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qaCIio5y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y24si9865074eju.288.2020.06.08.17.52.09; Mon, 08 Jun 2020 17:52:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qaCIio5y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728785AbgFHXKy (ORCPT + 99 others); Mon, 8 Jun 2020 19:10:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:55300 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728158AbgFHXJe (ORCPT ); Mon, 8 Jun 2020 19:09:34 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 613BF208A9; Mon, 8 Jun 2020 23:09:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591657774; bh=0kTjp2ybDUM0ctaeDR3fOgYBPE7QHYAKia5yuuniklk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qaCIio5yiI8x6cdUsoS2EKA9TBu/7diQy425MnvghBzAaymzwJ9qDsKF4s0KA19S6 6c4MflzThtnDIZWVTGaatFToMIJoXaBJFpvYT2j3VmJwaTgJrVH4WhqHNzA1UbkkJe pXADBhIcgKvLEl8RcFXG0SX361g611OVssyPwqlM= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Wei Yongjun , Kalle Valo , Sasha Levin , ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.7 157/274] ath11k: fix error return code in ath11k_dp_alloc() Date: Mon, 8 Jun 2020 19:04:10 -0400 Message-Id: <20200608230607.3361041-157-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org> References: <20200608230607.3361041-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Yongjun [ Upstream commit f76f750aeea47fd98b6502eb6d37f84ca33662bf ] Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Fixes: d0998eb84ed3 ("ath11k: optimise ath11k_dp_tx_completion_handler") Signed-off-by: Wei Yongjun Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200427104621.23752-1-weiyongjun1@huawei.com Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath11k/dp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/dp.c b/drivers/net/wireless/ath/ath11k/dp.c index 50350f77b309..2f35d325f7a5 100644 --- a/drivers/net/wireless/ath/ath11k/dp.c +++ b/drivers/net/wireless/ath/ath11k/dp.c @@ -909,8 +909,10 @@ int ath11k_dp_alloc(struct ath11k_base *ab) dp->tx_ring[i].tx_status_head = 0; dp->tx_ring[i].tx_status_tail = DP_TX_COMP_RING_SIZE - 1; dp->tx_ring[i].tx_status = kmalloc(size, GFP_KERNEL); - if (!dp->tx_ring[i].tx_status) + if (!dp->tx_ring[i].tx_status) { + ret = -ENOMEM; goto fail_cmn_srng_cleanup; + } } for (i = 0; i < HAL_DSCP_TID_MAP_TBL_NUM_ENTRIES_MAX; i++) -- 2.25.1