staging: r8188eu: check firmware header existence before access
authorMichael Straube <straube.linux@gmail.com>
Sun, 17 Apr 2022 17:54:41 +0000 (19:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2022 16:31:19 +0000 (18:31 +0200)
commit2e034e0390c8c60f0ffd8ade744701f7bec7674a
treeb2fc8c734215762fca180b4dbe2f87aeca1d36a7
parentc77031960762b95e85e857c91e9766cd2ba498eb
staging: r8188eu: check firmware header existence before access

We should access the fields of fwhdr only if the check for firmware
header existence is true. Move the affected code into the if block
that checks firmware header existence.

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220417175441.13830-9-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_fw.c