Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1543067lqp; Mon, 15 Apr 2024 09:19:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWJP/gUx2F+UIOtSZqcPhmqwNXDSjRvUMvLR+L8KZra1gpMjD3n4KsdiltNmVH7PPUL23Mron62XNZHpfbDq0tEehL6R9FvQA4447E3ug== X-Google-Smtp-Source: AGHT+IECWAAZP9PYSQMfUo1A6kV6RXHAc7GqoKwiM7DgmnYZdBkqFvoiZ+pP8CjEZ8iT6pRlYmjy X-Received: by 2002:a05:6122:218e:b0:4d4:2398:51a2 with SMTP id j14-20020a056122218e00b004d4239851a2mr6968267vkd.8.1713197942863; Mon, 15 Apr 2024 09:19:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713197942; cv=pass; d=google.com; s=arc-20160816; b=jDQC7IPmzBIB4JYsNcbztTAaltHcxh+1S29/jvQq+e8pixG7tLiR3faYCFJn6bA8ti VVVnddm/3fwaVlneSRLFCbtWA8Up+MGD9sKEV6INNvn2uFiRTk6G0ESCr30z+/QMcZyq GtxXjyoXF/72V/BbUXyBWWKB8LJ1uJvsSTlBw/Nu/lS9qHz0dH6hCVnPS82p8rSYB1rW QLc+HA+nfxU/PvOT79qqLEIZdnvsq1OAKAgsbZeEPylmjOc6W19ConXpVw4Cf3n+QIPI O3k/su7a/aOWcYfRVjuG22btGth+V+di3pXMk3ED2/a+FYpIklANj/YcNlPFdYJVXq/5 KYrw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=sZS5PybUDH+WqH6Sa8LywzS+Thk1uLag0/bFVQZopgY=; fh=fs/ofxtTvPIK5NFhK/sdloYqhaPEvwCln1+Y5hTJJ5w=; b=BXgQLQNBimmnRBGNabKYc7S1l969qfFvXI5W0lN2agOp8v2Rk6bohwjAIlEMn9GFMd 9yU2OX6VUiXWm+LZ0625Uyi+i8+/9l3D6roM2VgBsVij1k5I4nb+0NGlBU53FkIKNBVK Bn7FXGYOxFM/ekQ+QHENPAgurLBDuFS574vdwFNnRbwfkkwgozqO/Tk26aQtNEeunAkj TxCy2lzyHfqGi1XH2sfaBfVoPsSs3Rq3knAU+AN/WHfkaROOf05flAA0prv3wQIhuFOG pMS3VIYfKpNKiu84hPMKH9kDJfsK/SFjSbpPzCT9rNs8le/GO4AD868986sxq8a3AuPG peeg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=lOBwJbrm; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-6333-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6333-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b13-20020a0561020b0d00b0047b930031c1si18048vst.105.2024.04.15.09.19.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 09:19:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6333-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=lOBwJbrm; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-6333-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6333-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2778D1C20D65 for ; Mon, 15 Apr 2024 16:19:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47FD7745FA; Mon, 15 Apr 2024 16:18:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="lOBwJbrm" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD2A242072; Mon, 15 Apr 2024 16:18:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713197938; cv=none; b=q7VVSkmsO8MFhSeYx/kKk9rXBOYB+Q165STHHEAbNsJfkS+JK/lRkiSbytxk32/va/Kh5QhwUcKReIpxCA28xeFcnPizDmwNkCNQoAKohm603KTJR7Nb9t7vXKwQdbk4JamaSLtJiBN7EOllos9K+VtT79z2iYwHphUjwqoXEco= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713197938; c=relaxed/simple; bh=HRZ16pcKTsXfvuhSnVWDJ8KSOEd3+F59Kb2TPzi/bZE=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=V5Tb4k4/d66aBrjfhxIpZ1NQ9dlyZmEWiMbn+iTXVqvQGcc94BBh1HvMG4Zke6Z6uLTItSdkKqGsSwB2oZtT37irJAQfO9Rh90jpWxwRJga4qlgliiKkSNHtyFkBpHPJ+gJsuTX+KnzNT5Nv5vDl71As+lrazlCd4n+ULuoUTx8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=lOBwJbrm; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 43FFNNSG010273; Mon, 15 Apr 2024 16:18:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=sZS5PybUDH+WqH6Sa8LywzS+Thk1uLag0/bFVQZopgY=; b=lO BwJbrmnPXVU9u/Egkt8hJVnr1nt+D4hdseeSRvCl48NLaQAEv/Eu8sRxvQZ5Vklu XtwLWEwtWUSTdgtyW+2uyH8dgColntQJW5AqQa+ssFjSiJr7tGhFsRwIqKQzQ4re CKCVMYUGAMxV9DHRtOcGZu0c43fpNJ9XHPC2g6N8UwVS2U9Xkdma/ubp5sqomZBQ qc2ZaYw6sdRD5WuDnGVd1IZ8chfuvssrki3nm4uIeDtITWO85ne7xDA8OzfXhSln 04OaEfI/Eo1TFiaAb/q7MZpg26Eex4xmUg7SL1U3K+Vab3efTSr7T0ZLDFJJIyCB aTuyJevxiLr45SMPUW4A== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xh25ggx4a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Apr 2024 16:18:50 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43FGInwj023178 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Apr 2024 16:18:49 GMT Received: from [10.110.3.16] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 15 Apr 2024 09:18:48 -0700 Message-ID: Date: Mon, 15 Apr 2024 09:18:48 -0700 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] wifi: ath11k: Fix error handling in ath11k_wmi_p2p_noa_event() Content-Language: en-US To: Christophe JAILLET , Kalle Valo , Jeff Johnson , Kang Yang CC: , , "Kalle Valo" , , References: <6ee80f65f736db1646f6f201f60816cf35b6f3fe.1713180046.git.christophe.jaillet@wanadoo.fr> From: Jeff Johnson In-Reply-To: <6ee80f65f736db1646f6f201f60816cf35b6f3fe.1713180046.git.christophe.jaillet@wanadoo.fr> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: su9nS6VNfgFs0jlq66M3IlcC0Ecc_HWC X-Proofpoint-ORIG-GUID: su9nS6VNfgFs0jlq66M3IlcC0Ecc_HWC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-15_13,2024-04-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 bulkscore=0 spamscore=0 priorityscore=1501 malwarescore=0 mlxscore=0 adultscore=0 impostorscore=0 lowpriorityscore=0 mlxlogscore=999 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404150107 On 4/15/2024 4:23 AM, Christophe JAILLET wrote: > if (noa_descriptors > WMI_P2P_MAX_NOA_DESCRIPTORS), there is a mix of > return and goto. in such a case, 'ret' should be assigned an error code and > the 'td' should be freed to avoid a memory leak. > > While at it, return 'ret' instead of 0 in case of error. > This is actually harmless, because the only caller does not handle the > return value. in that case it would be preferable to change this to be a void function and not return anything. that would be consistent with most, if not all, of the other event handlers