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>
diff --git a/drivers/net/wireless/mwifiex/debugfs.c b/drivers/net/wireless/mwifiex/debugfs.c
index 7ddcb06..46d65e0 100644
--- a/drivers/net/wireless/mwifiex/debugfs.c
+++ b/drivers/net/wireless/mwifiex/debugfs.c
@@ -193,7 +193,7 @@
unsigned long page = get_zeroed_page(GFP_KERNEL);
char *p = (char *) page, fmt[64];
struct mwifiex_bss_info info;
- ssize_t ret = 0;
+ ssize_t ret;
int i = 0;
if (!p)
@@ -288,7 +288,7 @@
(struct mwifiex_private *) file->private_data;
unsigned long page = get_zeroed_page(GFP_KERNEL);
char *p = (char *) page;
- ssize_t ret = 0;
+ ssize_t ret;
struct mwifiex_ds_get_stats stats;
if (!p)
@@ -400,7 +400,7 @@
struct mwifiex_debug_data *d = &items[0];
unsigned long page = get_zeroed_page(GFP_KERNEL);
char *p = (char *) page;
- ssize_t ret = 0;
+ ssize_t ret;
size_t size, addr;
long val;
int i, j;
@@ -507,7 +507,7 @@
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *) addr;
size_t buf_size = min(count, (size_t) (PAGE_SIZE - 1));
- int ret = 0;
+ int ret;
u32 reg_type = 0, reg_offset = 0, reg_value = UINT_MAX;
if (!buf)
@@ -650,7 +650,7 @@
(struct mwifiex_private *) file->private_data;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *) addr;
- int pos = 0, ret = 0, i = 0;
+ int pos = 0, ret = 0, i;
u8 value[MAX_EEPROM_DATA];
if (!buf)