提交 fa161cb7 编写于 作者: D Dan Carpenter 提交者: John W. Linville

mwifiex: remove an unneeded NULL check

We dereference adapter in the error handling code so this needed to
be fixed.  This function is always called like:
	adapter->if_ops.host_to_card(adapter, ...);
so adapter can never be NULL and I've removed the NULL check.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NBing Zhao <bzhao@marvell.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 fba6fe63
......@@ -1671,9 +1671,8 @@ static int mwifiex_pcie_host_to_card(struct mwifiex_adapter *adapter, u8 type,
struct sk_buff *skb,
struct mwifiex_tx_param *tx_param)
{
if (!adapter || !skb) {
dev_err(adapter->dev, "Invalid parameter in %s <%p, %p>\n",
__func__, adapter, skb);
if (!skb) {
dev_err(adapter->dev, "Passed NULL skb to %s\n", __func__);
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册