提交 dfd6b480 编写于 作者: T Tobin C. Harding 提交者: Greg Kroah-Hartman

staging: ks7010: reduce level of indentation

Code is deeply nested. One level of indentation may be removed by
inverting if statement conditional.

Invert conditional, return if new conditional evaluates to true.
Signed-off-by: NTobin C. Harding <me@tobin.cc>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 034a7178
......@@ -323,7 +323,10 @@ int hostif_data_indication_wpa(struct ks_wlan_private *priv,
eth_hdr = (struct ether_hdr *)(priv->rxp);
eth_proto = ntohs(eth_hdr->h_proto);
if (memcmp(&eth_hdr->h_source[0], &priv->eth_addr[0], ETH_ALEN)) { /* source address check */
/* source address check */
if (!memcmp(&eth_hdr->h_source[0], &priv->eth_addr[0], ETH_ALEN))
return 0;
if (eth_hdr->h_dest_snap != eth_hdr->h_source_snap) {
DPRINTK(1, "invalid data format\n");
priv->nstats.rx_errors++;
......@@ -395,7 +398,6 @@ int hostif_data_indication_wpa(struct ks_wlan_private *priv,
}
}
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册