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: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
fba6fe6347
commit
fa161cb7aa
1 changed files with 2 additions and 3 deletions
|
@ -1671,9 +1671,8 @@ static int mwifiex_pcie_host_to_card(struct mwifiex_adapter *adapter, u8 type,
|
||||||
struct sk_buff *skb,
|
struct sk_buff *skb,
|
||||||
struct mwifiex_tx_param *tx_param)
|
struct mwifiex_tx_param *tx_param)
|
||||||
{
|
{
|
||||||
if (!adapter || !skb) {
|
if (!skb) {
|
||||||
dev_err(adapter->dev, "Invalid parameter in %s <%p, %p>\n",
|
dev_err(adapter->dev, "Passed NULL skb to %s\n", __func__);
|
||||||
__func__, adapter, skb);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue