diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-16 20:31:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-16 20:31:36 -0400 |
commit | 7ac3c93e5dd74486ca4f8f0b02ae55182658d2e5 (patch) | |
tree | 08b949c872aefbc0f8e12bdcc4dc82297bdd0f2e /drivers/usb/class | |
parent | 23666a74c9f552bc9cfef20ded1b8b29bedb80c6 (diff) | |
parent | 5698bd757d55b1bb87edd1a9744ab09c142abfc2 (diff) |
Merge 3.6-rc6 into tty-next
This pulls in the fixes in 3.6-rc6
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r-- | drivers/usb/class/cdc-wdm.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index 65a55abb791f..5f0cb417b736 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c | |||
@@ -109,12 +109,14 @@ static struct usb_driver wdm_driver; | |||
109 | /* return intfdata if we own the interface, else look up intf in the list */ | 109 | /* return intfdata if we own the interface, else look up intf in the list */ |
110 | static struct wdm_device *wdm_find_device(struct usb_interface *intf) | 110 | static struct wdm_device *wdm_find_device(struct usb_interface *intf) |
111 | { | 111 | { |
112 | struct wdm_device *desc = NULL; | 112 | struct wdm_device *desc; |
113 | 113 | ||
114 | spin_lock(&wdm_device_list_lock); | 114 | spin_lock(&wdm_device_list_lock); |
115 | list_for_each_entry(desc, &wdm_device_list, device_list) | 115 | list_for_each_entry(desc, &wdm_device_list, device_list) |
116 | if (desc->intf == intf) | 116 | if (desc->intf == intf) |
117 | break; | 117 | goto found; |
118 | desc = NULL; | ||
119 | found: | ||
118 | spin_unlock(&wdm_device_list_lock); | 120 | spin_unlock(&wdm_device_list_lock); |
119 | 121 | ||
120 | return desc; | 122 | return desc; |
@@ -122,12 +124,14 @@ static struct wdm_device *wdm_find_device(struct usb_interface *intf) | |||
122 | 124 | ||
123 | static struct wdm_device *wdm_find_device_by_minor(int minor) | 125 | static struct wdm_device *wdm_find_device_by_minor(int minor) |
124 | { | 126 | { |
125 | struct wdm_device *desc = NULL; | 127 | struct wdm_device *desc; |
126 | 128 | ||
127 | spin_lock(&wdm_device_list_lock); | 129 | spin_lock(&wdm_device_list_lock); |
128 | list_for_each_entry(desc, &wdm_device_list, device_list) | 130 | list_for_each_entry(desc, &wdm_device_list, device_list) |
129 | if (desc->intf->minor == minor) | 131 | if (desc->intf->minor == minor) |
130 | break; | 132 | goto found; |
133 | desc = NULL; | ||
134 | found: | ||
131 | spin_unlock(&wdm_device_list_lock); | 135 | spin_unlock(&wdm_device_list_lock); |
132 | 136 | ||
133 | return desc; | 137 | return desc; |