Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
idpf: Slightly simplify memory management in idpf_add_del_mac_filters()
In idpf_add_del_mac_filters(), filters are chunked up into multiple messages to avoid sending a control queue message buffer that is too large. Each chunk has up to IDPF_NUM_FILTERS_PER_MSG entries. So except for the last iteration which can be smaller, space for exactly IDPF_NUM_FILTERS_PER_MSG entries is allocated. There is no need to free and reallocate a smaller array just for the last iteration. This slightly simplifies the code and avoid an (unlikely) memory allocation failure. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: NipaLocal <nipa@local>
- Loading branch information