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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux