aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/hc_crisv10.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/hc_crisv10.c')
-rw-r--r--drivers/usb/host/hc_crisv10.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/usb/host/hc_crisv10.c b/drivers/usb/host/hc_crisv10.c
index 641268d7e6f3..2fe7fd19437b 100644
--- a/drivers/usb/host/hc_crisv10.c
+++ b/drivers/usb/host/hc_crisv10.c
@@ -2137,10 +2137,9 @@ static int etrax_usb_submit_bulk_urb(struct urb *urb)
2137 urb->status = -EINPROGRESS; 2137 urb->status = -EINPROGRESS;
2138 2138
2139 /* Setup the hcpriv data. */ 2139 /* Setup the hcpriv data. */
2140 urb_priv = kmalloc(sizeof(etrax_urb_priv_t), KMALLOC_FLAG); 2140 urb_priv = kzalloc(sizeof(etrax_urb_priv_t), KMALLOC_FLAG);
2141 assert(urb_priv != NULL); 2141 assert(urb_priv != NULL);
2142 /* This sets rx_offset to 0. */ 2142 /* This sets rx_offset to 0. */
2143 memset(urb_priv, 0, sizeof(etrax_urb_priv_t));
2144 urb_priv->urb_state = NOT_STARTED; 2143 urb_priv->urb_state = NOT_STARTED;
2145 urb->hcpriv = urb_priv; 2144 urb->hcpriv = urb_priv;
2146 2145
@@ -2475,10 +2474,9 @@ static int etrax_usb_submit_ctrl_urb(struct urb *urb)
2475 urb->status = -EINPROGRESS; 2474 urb->status = -EINPROGRESS;
2476 2475
2477 /* Setup the hcpriv data. */ 2476 /* Setup the hcpriv data. */
2478 urb_priv = kmalloc(sizeof(etrax_urb_priv_t), KMALLOC_FLAG); 2477 urb_priv = kzalloc(sizeof(etrax_urb_priv_t), KMALLOC_FLAG);
2479 assert(urb_priv != NULL); 2478 assert(urb_priv != NULL);
2480 /* This sets rx_offset to 0. */ 2479 /* This sets rx_offset to 0. */
2481 memset(urb_priv, 0, sizeof(etrax_urb_priv_t));
2482 urb_priv->urb_state = NOT_STARTED; 2480 urb_priv->urb_state = NOT_STARTED;
2483 urb->hcpriv = urb_priv; 2481 urb->hcpriv = urb_priv;
2484 2482
@@ -2767,9 +2765,8 @@ static void etrax_usb_add_to_intr_sb_list(struct urb *urb, int epid)
2767 maxlen = usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe)); 2765 maxlen = usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe));
2768 interval = urb->interval; 2766 interval = urb->interval;
2769 2767
2770 urb_priv = kmalloc(sizeof(etrax_urb_priv_t), KMALLOC_FLAG); 2768 urb_priv = kzalloc(sizeof(etrax_urb_priv_t), KMALLOC_FLAG);
2771 assert(urb_priv != NULL); 2769 assert(urb_priv != NULL);
2772 memset(urb_priv, 0, sizeof(etrax_urb_priv_t));
2773 urb->hcpriv = urb_priv; 2770 urb->hcpriv = urb_priv;
2774 2771
2775 first_ep = &TxIntrEPList[0]; 2772 first_ep = &TxIntrEPList[0];
@@ -2997,9 +2994,8 @@ static void etrax_usb_add_to_isoc_sb_list(struct urb *urb, int epid)
2997 2994
2998 prev_sb_desc = next_sb_desc = temp_sb_desc = NULL; 2995 prev_sb_desc = next_sb_desc = temp_sb_desc = NULL;
2999 2996
3000 urb_priv = kmalloc(sizeof(etrax_urb_priv_t), GFP_ATOMIC); 2997 urb_priv = kzalloc(sizeof(etrax_urb_priv_t), GFP_ATOMIC);
3001 assert(urb_priv != NULL); 2998 assert(urb_priv != NULL);
3002 memset(urb_priv, 0, sizeof(etrax_urb_priv_t));
3003 2999
3004 urb->hcpriv = urb_priv; 3000 urb->hcpriv = urb_priv;
3005 urb_priv->epid = epid; 3001 urb_priv->epid = epid;