Skip to contentSkip to conversation

cx231xx: silence uninitialized variable warning

PATCH New Dan Carpenter 1 participant 1 message Apr 22, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cx231xx: silence uninitialized variable warning

We print an uninitialized "actlen" variable on the error path.

drivers/media/usb/cx231xx/cx231xx-core.c +2 -1
index f497888..6741fd0 100644
@@ -752,7 +752,8 @@ EXPORT_SYMBOL_GPL(cx231xx_set_mode);
 int cx231xx_ep5_bulkout(struct cx231xx *dev, u8 *firmware, u16 size)
 {
 	int errCode = 0;
-	int actlen, ret = -ENOMEM;
+	int actlen = -1;
+	int ret = -ENOMEM;
 	u32 *buffer;
 
 	buffer = kzalloc(4096, GFP_KERNEL);