Skip to contentSkip to conversation

staging: ft1000: fix use of potentially unitiliaside variable

PATCH New Michal Nazarewicz 1 participant 1 message Nov 10, 2013 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: ft1000: fix use of potentially unitiliaside variable

From: Michal Nazarewicz <[email protected]>

If boot_case is false, status in never assigned a value.

---
 drivers/staging/ft1000/ft1000-usb/ft1000_download.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/ft1000/ft1000-usb/ft1000_download.c +1 -2
index 68ded17..12f333f 100644
@@ -578,7 +578,7 @@ static int request_code_segment(struct ft1000_usb *ft1000dev, u16 **s_file,
 		 u8 **c_file, const u8 *endpoint, bool boot_case)
 {
 	long word_length;
-	int status;
+	int status = 0;
 
 	/*DEBUG("FT1000:REQUEST_CODE_SEGMENT\n");i*/
 	word_length = get_request_value(ft1000dev);
@@ -1074,4 +1074,3 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
 
 	return status;
 }
-
Signature · 1 line
1.8.3.2