diff options
| author | Hans de Goede <hdegoede@redhat.com> | 2013-10-09 11:01:40 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-11 19:33:58 -0400 |
| commit | 9ef73dbdd0fc292d183e93cd1d4b21d1a66040d7 (patch) | |
| tree | f017a212a608fe571e7e827cdbbf4fa6e9822056 /include/linux | |
| parent | a72e2e5cc2e74ed793a0651e072a8529cfb93631 (diff) | |
usb-anchor: Ensure poisened gets initialized to 0
And do so in a way which ensures that any fields added in the future will
also get properly zero-ed.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/usb.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index f726c39097e0..fa8bedf06c6e 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -1214,6 +1214,7 @@ struct usb_anchor { | |||
| 1214 | 1214 | ||
| 1215 | static inline void init_usb_anchor(struct usb_anchor *anchor) | 1215 | static inline void init_usb_anchor(struct usb_anchor *anchor) |
| 1216 | { | 1216 | { |
| 1217 | memset(anchor, 0, sizeof(*anchor)); | ||
| 1217 | INIT_LIST_HEAD(&anchor->urb_list); | 1218 | INIT_LIST_HEAD(&anchor->urb_list); |
| 1218 | init_waitqueue_head(&anchor->wait); | 1219 | init_waitqueue_head(&anchor->wait); |
| 1219 | spin_lock_init(&anchor->lock); | 1220 | spin_lock_init(&anchor->lock); |
