[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b4c8a18c-286c-442f-a7e9-d4a0bb604083@quicinc.com>
Date: Mon, 15 Apr 2024 09:18:48 -0700
From: Jeff Johnson <quic_jjohnson@...cinc.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Kalle Valo
<kvalo@...nel.org>, Jeff Johnson <jjohnson@...nel.org>,
Kang Yang
<quic_kangyang@...cinc.com>
CC: <linux-kernel@...r.kernel.org>, <kernel-janitors@...r.kernel.org>,
"Kalle
Valo" <quic_kvalo@...cinc.com>,
<linux-wireless@...r.kernel.org>, <ath11k@...ts.infradead.org>
Subject: Re: [PATCH] wifi: ath11k: Fix error handling in
ath11k_wmi_p2p_noa_event()
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
Powered by blists - more mailing lists