linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] Bluetooth: ath3k: Silence uninitialized variable warning
@ 2016-04-22 10:02 Dan Carpenter
  2016-04-22 10:42 ` Marcel Holtmann
  2016-04-23  6:47 ` Afzal Mohammed
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2016-04-22 10:02 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: Gustavo Padovan, Johan Hedberg, linux-bluetooth, linux-kernel,
	kernel-janitors

We could print an uninitialized value in the error message.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index 47ca4b3..641c2d1 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -206,7 +206,8 @@ static int ath3k_load_firmware(struct usb_device *udev,
 				const struct firmware *firmware)
 {
 	u8 *send_buf;
-	int err, pipe, len, size, sent = 0;
+	int len = 0;
+	int err, pipe, size, sent = 0;
 	int count = firmware->size;
 
 	BT_DBG("udev %p", udev);
@@ -302,7 +303,8 @@ static int ath3k_load_fwfile(struct usb_device *udev,
 		const struct firmware *firmware)
 {
 	u8 *send_buf;
-	int err, pipe, len, size, count, sent = 0;
+	int len = 0;
+	int err, pipe, size, count, sent = 0;
 	int ret;
 
 	count = firmware->size;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-23  7:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-22 10:02 [patch] Bluetooth: ath3k: Silence uninitialized variable warning Dan Carpenter
2016-04-22 10:42 ` Marcel Holtmann
2016-04-23  6:47 ` Afzal Mohammed
2016-04-23  7:21   ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).