[PATCH 3/3] usb: wusbcore: fix below build warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



linux-2.6/drivers/usb/wusbcore/wa-xfer.c: In function 'wa_buf_in_cb':
linux-2.6/drivers/usb/wusbcore/wa-xfer.c:2590: warning: 'rpipe' may be used uninitialized in this function

Signed-off-by: Peter Chen <peter.chen@xxxxxxxxxxxxx>
---
 drivers/usb/wusbcore/wa-xfer.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c
index 3e2e4ed..11c2ec0 100644
--- a/drivers/usb/wusbcore/wa-xfer.c
+++ b/drivers/usb/wusbcore/wa-xfer.c
@@ -2587,7 +2587,7 @@ static void wa_buf_in_cb(struct urb *urb)
 	struct wa_xfer *xfer = seg->xfer;
 	struct wahc *wa;
 	struct device *dev;
-	struct wa_rpipe *rpipe;
+	struct wa_rpipe *rpipe = NULL;
 	unsigned rpipe_ready = 0, isoc_data_frame_count = 0;
 	unsigned long flags;
 	int resubmit_dti = 0, active_buf_in_urbs;
@@ -2671,7 +2671,7 @@ static void wa_buf_in_cb(struct urb *urb)
 		spin_unlock_irqrestore(&xfer->lock, flags);
 		if (done)
 			wa_xfer_completion(xfer);
-		if (rpipe_ready)
+		if (rpipe_ready && rpipe)
 			wa_xfer_delayed_run(rpipe);
 		break;
 	case -ECONNRESET:	/* URB unlinked; no need to do anything */
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux