Staging: rtl8192e: Fix potential NULL pointer dereference

We need to make sure the struct rtllib_device pointer ieee is not NULL
after the goto rx_dropped label since it is dereferenced there.

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Emil Goode 2014-07-02 11:25:51 +02:00 committed by Greg Kroah-Hartman
parent dd3fde11d3
commit 4fa4260214

View file

@ -1496,7 +1496,8 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb,
return ret;
rx_dropped:
ieee->stats.rx_dropped++;
if (ieee)
ieee->stats.rx_dropped++;
return 0;
}
EXPORT_SYMBOL(rtllib_rx);