When driver gets unloaded due to error situation there is a chance
a packet gets received while fws has already been cleaned up. This
will result in kernel crash. This patch adds a check to avoid this
crash.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
if (!signal_len)
return 0;
/* if flow control disabled, skip to packet data and leave */
- if (!fws->fw_signals) {
+ if ((!fws) || (!fws->fw_signals)) {
skb_pull(skb, signal_len);
return 0;
}