staging: ozwpan: Remove redundant null check before kfree in ozproto.c
authorSachin Kamat <sachin.kamat@linaro.org>
Tue, 20 Nov 2012 11:40:09 +0000 (17:10 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Nov 2012 21:50:12 +0000 (13:50 -0800)
kfree on NULL pointer is a no-op.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ozwpan/ozproto.c

index cfb5160..e00a539 100644 (file)
@@ -566,8 +566,7 @@ static void oz_protocol_timer(unsigned long arg)
                }
                spin_unlock_bh(&g_polling_lock);
                oz_pd_put(pd);
-               if (t)
-                       kfree(t);
+               kfree(t);
                t = t2;
        } while (t);
        g_timer_state = OZ_TIMER_IDLE;