summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/main.c
diff options
context:
space:
mode:
authorYogesh Ashok Powar <yogeshp@marvell.com>2011-05-03 20:11:46 -0700
committerJohn W. Linville <linville@tuxdriver.com>2011-05-05 14:59:16 -0400
commit270e58e8898c8be40451ebee45b6c9b5bd5db04b (patch)
tree4dd71a0e18a3f5528af59fcaebc61d98377792e5 /drivers/net/wireless/mwifiex/main.c
parent57f16b5da03784d1660133fbec7281ea5735da69 (diff)
mwifiex: remove unnecessary variable initialization
Skip initialization of local variables with some default values if the values are not going to be used further down the code path. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/main.c')
-rw-r--r--drivers/net/wireless/mwifiex/main.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c
index c5971880e7b..38f912b8fce 100644
--- a/drivers/net/wireless/mwifiex/main.c
+++ b/drivers/net/wireless/mwifiex/main.c
@@ -150,7 +150,7 @@ error:
*/
static int mwifiex_unregister(struct mwifiex_adapter *adapter)
{
- s32 i = 0;
+ s32 i;
del_timer(&adapter->cmd_timer);
@@ -379,8 +379,7 @@ static void mwifiex_free_adapter(struct mwifiex_adapter *adapter)
*/
static int mwifiex_init_hw_fw(struct mwifiex_adapter *adapter)
{
- int ret = 0;
- int err;
+ int ret, err;
struct mwifiex_fw_image fw;
memset(&fw, 0, sizeof(struct mwifiex_fw_image));
@@ -449,7 +448,7 @@ done:
static void
mwifiex_fill_buffer(struct sk_buff *skb)
{
- struct ethhdr *eth = NULL;
+ struct ethhdr *eth;
struct iphdr *iph;
struct timeval tv;
u8 tid = 0;
@@ -510,7 +509,7 @@ static int
mwifiex_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
- struct sk_buff *new_skb = NULL;
+ struct sk_buff *new_skb;
struct mwifiex_txinfo *tx_info;
dev_dbg(priv->adapter->dev, "data: %lu BSS(%d): Data <= kernel\n",
@@ -571,7 +570,7 @@ mwifiex_set_mac_address(struct net_device *dev, void *addr)
{
struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
struct sockaddr *hw_addr = (struct sockaddr *) addr;
- int ret = 0;
+ int ret;
memcpy(priv->curr_addr, hw_addr->sa_data, ETH_ALEN);
@@ -696,9 +695,9 @@ static struct mwifiex_private *mwifiex_add_interface(
struct mwifiex_adapter *adapter,
u8 bss_index, u8 bss_type)
{
- struct net_device *dev = NULL;
- struct mwifiex_private *priv = NULL;
- void *mdev_priv = NULL;
+ struct net_device *dev;
+ struct mwifiex_private *priv;
+ void *mdev_priv;
dev = alloc_netdev_mq(sizeof(struct mwifiex_private *), "mlan%d",
ether_setup, 1);
@@ -763,7 +762,7 @@ error:
static void
mwifiex_remove_interface(struct mwifiex_adapter *adapter, u8 bss_index)
{
- struct net_device *dev = NULL;
+ struct net_device *dev;
struct mwifiex_private *priv = adapter->priv[bss_index];
if (!priv)