summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mwifiex/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/mwifiex/init.c')
-rw-r--r--drivers/net/wireless/mwifiex/init.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c
index fc2c0c5728d9..27ad72b291b7 100644
--- a/drivers/net/wireless/mwifiex/init.c
+++ b/drivers/net/wireless/mwifiex/init.c
@@ -151,7 +151,7 @@ static int mwifiex_init_priv(struct mwifiex_private *priv)
*/
static int mwifiex_allocate_adapter(struct mwifiex_adapter *adapter)
{
- int ret = 0;
+ int ret;
u32 buf_size;
struct mwifiex_bssdescriptor *temp_scan_table;
@@ -342,9 +342,8 @@ mwifiex_free_adapter(struct mwifiex_adapter *adapter)
*/
int mwifiex_init_lock_list(struct mwifiex_adapter *adapter)
{
- struct mwifiex_private *priv = NULL;
- s32 i = 0;
- u32 j = 0;
+ struct mwifiex_private *priv;
+ s32 i, j;
spin_lock_init(&adapter->mwifiex_lock);
spin_lock_init(&adapter->int_lock);
@@ -400,9 +399,8 @@ int mwifiex_init_lock_list(struct mwifiex_adapter *adapter)
*/
void mwifiex_free_lock_list(struct mwifiex_adapter *adapter)
{
- struct mwifiex_private *priv = NULL;
- s32 i = 0;
- s32 j = 0;
+ struct mwifiex_private *priv;
+ s32 i, j;
/* Free lists */
list_del(&adapter->cmd_free_q);
@@ -436,10 +434,9 @@ void mwifiex_free_lock_list(struct mwifiex_adapter *adapter)
*/
int mwifiex_init_fw(struct mwifiex_adapter *adapter)
{
- int ret = 0;
- struct mwifiex_private *priv = NULL;
- u8 i = 0;
- u8 first_sta = true;
+ int ret;
+ struct mwifiex_private *priv;
+ u8 i, first_sta = true;
int is_cmd_pend_q_empty;
unsigned long flags;
@@ -497,8 +494,7 @@ static void mwifiex_delete_bss_prio_tbl(struct mwifiex_private *priv)
{
int i;
struct mwifiex_adapter *adapter = priv->adapter;
- struct mwifiex_bss_prio_node *bssprio_node = NULL, *tmp_node = NULL,
- **cur = NULL;
+ struct mwifiex_bss_prio_node *bssprio_node, *tmp_node, **cur;
struct list_head *head;
spinlock_t *lock;
unsigned long flags;
@@ -552,8 +548,8 @@ int
mwifiex_shutdown_drv(struct mwifiex_adapter *adapter)
{
int ret = -EINPROGRESS;
- struct mwifiex_private *priv = NULL;
- s32 i = 0;
+ struct mwifiex_private *priv;
+ s32 i;
unsigned long flags;
/* mwifiex already shutdown */
@@ -608,9 +604,8 @@ mwifiex_shutdown_drv(struct mwifiex_adapter *adapter)
int mwifiex_dnld_fw(struct mwifiex_adapter *adapter,
struct mwifiex_fw_image *pmfw)
{
- int ret = 0;
+ int ret, winner;
u32 poll_num = 1;
- int winner;
/* Check if firmware is already running */
ret = adapter->if_ops.check_fw_status(adapter, poll_num, &winner);