Commit 024bd7a8 authored by Matthew Dharm's avatar Matthew Dharm Committed by Greg Kroah-Hartman

[PATCH] usb-storage: initialize urb status

This patch initializes the URB status before it's used.  While not
technically required, it's good programming practice (and a similar bug
just bit us on 2.4 with UHCI).
parent 5e465242
...@@ -126,6 +126,7 @@ static int usb_stor_msg_common(struct us_data *us) ...@@ -126,6 +126,7 @@ static int usb_stor_msg_common(struct us_data *us)
us->current_urb->actual_length = 0; us->current_urb->actual_length = 0;
us->current_urb->error_count = 0; us->current_urb->error_count = 0;
us->current_urb->transfer_flags = URB_ASYNC_UNLINK; us->current_urb->transfer_flags = URB_ASYNC_UNLINK;
us->current_urb->status = 0;
/* submit the URB */ /* submit the URB */
status = usb_submit_urb(us->current_urb, GFP_NOIO); status = usb_submit_urb(us->current_urb, GFP_NOIO);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment