[PATCH] wifi: ath11k: Fix error handling in ath11k_wmi_p2p_noa_event()

Jeff Johnson quic_jjohnson at quicinc.com
Mon Apr 15 09:18:48 PDT 2024


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




More information about the ath11k mailing list