v2: removed braces from if statement

If ieee == NULL we jump to rx_dropped. Therefore we have to check again,
if ieee == NULL before we use it.

Signed-off-by: Andreas Platschek <platsc...@ict.tuwien.ac.at>
---
 drivers/staging/rtl8192e/rtllib_rx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c
b/drivers/staging/rtl8192e/rtllib_rx.c
index 60de54c..7258b17 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -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 != NULL)
+               ieee->stats.rx_dropped++;
        return 0;
 }
 EXPORT_SYMBOL(rtllib_rx);
-- 
1.7.10.4
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to