staging: r8188eu: rtw_init_hwxmits is not needed
authorMartin Kaiser <martin@kaiser.cx>
Fri, 30 Dec 2022 18:06:45 +0000 (19:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jan 2023 18:31:23 +0000 (19:31 +0100)
commit5877852e9f959483202cb2a7d55e7f5f13b76208
treead93f78c3264574780bd57b15d286a03b041df4a
parent1b757dfdab91ea15d26ab89f01be4eb9ab9067a7
staging: r8188eu: rtw_init_hwxmits is not needed

The _rtw_init_xmit_priv function calls rtw_alloc_hwxmits to allocate
memory for pxmitpriv->hwxmits (this is an array of struct hw_xmit). This
allocation uses kzalloc, the allocated memory is initialised with 0.

After the allocation, _rtw_init_xmit_priv calls rtw_init_hwxmits to set an
element of each hw_xmit to 0. This is not necessary, we can remove the
rtw_init_hwxmits call and the now unused function rtw_init_hwxmits.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20221230180646.91008-20-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_xmit.c
drivers/staging/r8188eu/include/rtw_xmit.h