staging: r8188eu: clean up rtw_hal_init

Clean up the rtw_hal_init function.

Remove the status variable. Exit immediately for errors.

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/20221106124901.720785-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Martin Kaiser 2022-11-06 13:48:58 +01:00 коммит произвёл Greg Kroah-Hartman
Родитель d44fa4cb2e
Коммит b693737876
1 изменённых файлов: 7 добавлений и 12 удалений

Просмотреть файл

@ -6,24 +6,19 @@
#include "../include/drv_types.h"
#include "../include/hal_intf.h"
uint rtw_hal_init(struct adapter *adapt)
uint rtw_hal_init(struct adapter *adapt)
{
uint status = _SUCCESS;
adapt->hw_init_completed = false;
status = rtl8188eu_hal_init(adapt);
if (rtl8188eu_hal_init(adapt) != _SUCCESS)
return _FAIL;
if (status == _SUCCESS) {
adapt->hw_init_completed = true;
adapt->hw_init_completed = true;
if (adapt->registrypriv.notch_filter == 1)
hal_notch_filter_8188e(adapt, 1);
} else {
adapt->hw_init_completed = false;
}
if (adapt->registrypriv.notch_filter == 1)
hal_notch_filter_8188e(adapt, 1);
return status;
return _SUCCESS;
}
uint rtw_hal_deinit(struct adapter *adapt)