staging: ozwpan: Remove redundant null check before kfree in ozpd.c
authorSachin Kamat <sachin.kamat@linaro.org>
Tue, 20 Nov 2012 11:40:08 +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/ozpd.c

index 0b3648c..118a4db 100644 (file)
@@ -402,8 +402,7 @@ static void oz_tx_frame_free(struct oz_pd *pd, struct oz_tx_frame *f)
                f = 0;
        }
        spin_unlock_bh(&pd->tx_frame_lock);
-       if (f)
-               kfree(f);
+       kfree(f);
 }
 /*------------------------------------------------------------------------------
  * Context: softirq-serialized
@@ -737,8 +736,7 @@ int oz_isoc_stream_create(struct oz_pd *pd, u8 ep_num)
                st = 0;
        }
        spin_unlock_bh(&pd->stream_lock);
-       if (st)
-               kfree(st);
+       kfree(st);
        return 0;
 }
 /*------------------------------------------------------------------------------