]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
staging: rtl8723bs: refactor rtw_joinbss_event_prehandle to reduce indentation
authorJose A. Perez de Azpillaga <azpijr@gmail.com>
Sat, 21 Mar 2026 18:27:00 +0000 (19:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Mar 2026 08:30:41 +0000 (10:30 +0200)
commitff97e01144fa4a1149c6352d35e8ead74c436460
tree5cacdb834125c31552bfd22d11375e594e1ab40d
parent96e82c72feef0b76ebd2b5ec4ae9e5e03595ca78
staging: rtl8723bs: refactor rtw_joinbss_event_prehandle to reduce indentation

The rtw_joinbss_event_prehandle function has excessive indentation due
to deeply nested if-statements.

Refactor the function using early returns and guard clauses for the
failure paths. This flattens the code and significantly improves
readability.

Signed-off-by: Jose A. Perez de Azpillaga <azpijr@gmail.com>
Reviewed-by: Luka Gejak <luka.gejak@linux.dev>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/20260321182713.665872-3-azpijr@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_mlme.c