提交 b150718e 编写于 作者: S Sachin Kamat 提交者: Greg Kroah-Hartman

staging: ozwpan: Remove redundant null check before kfree in ozpd.c

kfree on NULL pointer is a no-op.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NRupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 43f971eb
......@@ -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;
}
/*------------------------------------------------------------------------------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册