Re: [PATCH] Staging: rtl8192e prohibit deferencing of NULL pointer

2014-06-18 Thread Dan Carpenter
On Wed, Jun 18, 2014 at 06:16:09PM +, Andreas Platschek wrote: > If ieee == NULL we jump to rx_dropped. Therefore we have to check again, > if ieee != NULL before we use it. Take a look at the caller as well. It doesn't check ieee for NULL so probably this can never be NULL. How would that m

Re: [PATCH] Staging: rtl8192e prohibit deferencing of NULL pointer

2014-06-18 Thread Valentina Manea
On Wed, Jun 18, 2014 at 11:16 AM, Andreas Platschek wrote: > > rx_dropped: > -ieee->stats.rx_dropped++; > +if (ieee != NULL) { > +ieee->stats.rx_dropped++; > +} > return 0; Style nit: don't use braces around a single statement. Tina

[PATCH] Staging: rtl8192e prohibit deferencing of NULL pointer

2014-06-18 Thread Andreas Platschek
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 --- drivers/staging/rtl8192e/rtllib_rx.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/dr