diff options
| author | James Morris <james.l.morris@oracle.com> | 2012-09-28 13:37:32 +1000 | 
|---|---|---|
| committer | James Morris <james.l.morris@oracle.com> | 2012-09-28 13:37:32 +1000 | 
| commit | bf5308344527d015ac9a6d2bda4ad4d40fd7d943 (patch) | |
| tree | 566e61e2cfc648c374d15cfc8c661b73e1a471f8 /drivers/usb/class/cdc-wdm.c | |
| parent | 3585e96cd1049682b8a19a0b699422156e9d735b (diff) | |
| parent | 979570e02981d4a8fc20b3cc8fd651856c98ee9d (diff) | |
| download | olio-linux-3.10-bf5308344527d015ac9a6d2bda4ad4d40fd7d943.tar.xz olio-linux-3.10-bf5308344527d015ac9a6d2bda4ad4d40fd7d943.zip  | |
Merge tag 'v3.6-rc7' into next
Linux 3.6-rc7
Requested by David Howells so he can merge his key susbsystem work into
my tree with requisite -linus changesets.
Diffstat (limited to 'drivers/usb/class/cdc-wdm.c')
| -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 65a55abb791..5f0cb417b73 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;  /* return intfdata if we own the interface, else look up intf in the list */  static struct wdm_device *wdm_find_device(struct usb_interface *intf)  { -	struct wdm_device *desc = NULL; +	struct wdm_device *desc;  	spin_lock(&wdm_device_list_lock);  	list_for_each_entry(desc, &wdm_device_list, device_list)  		if (desc->intf == intf) -			break; +			goto found; +	desc = NULL; +found:  	spin_unlock(&wdm_device_list_lock);  	return desc; @@ -122,12 +124,14 @@ static struct wdm_device *wdm_find_device(struct usb_interface *intf)  static struct wdm_device *wdm_find_device_by_minor(int minor)  { -	struct wdm_device *desc = NULL; +	struct wdm_device *desc;  	spin_lock(&wdm_device_list_lock);  	list_for_each_entry(desc, &wdm_device_list, device_list)  		if (desc->intf->minor == minor) -			break; +			goto found; +	desc = NULL; +found:  	spin_unlock(&wdm_device_list_lock);  	return desc;  |