diff options
Diffstat (limited to 'drivers/usb/mon/mon_text.c')
-rw-r--r-- | drivers/usb/mon/mon_text.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/mon/mon_text.c b/drivers/usb/mon/mon_text.c index 59089e8b7e5e..ac043ec2b8dc 100644 --- a/drivers/usb/mon/mon_text.c +++ b/drivers/usb/mon/mon_text.c | |||
@@ -213,12 +213,11 @@ static int mon_text_open(struct inode *inode, struct file *file) | |||
213 | mbus = inode->u.generic_ip; | 213 | mbus = inode->u.generic_ip; |
214 | ubus = mbus->u_bus; | 214 | ubus = mbus->u_bus; |
215 | 215 | ||
216 | rp = kmalloc(sizeof(struct mon_reader_text), GFP_KERNEL); | 216 | rp = kzalloc(sizeof(struct mon_reader_text), GFP_KERNEL); |
217 | if (rp == NULL) { | 217 | if (rp == NULL) { |
218 | rc = -ENOMEM; | 218 | rc = -ENOMEM; |
219 | goto err_alloc; | 219 | goto err_alloc; |
220 | } | 220 | } |
221 | memset(rp, 0, sizeof(struct mon_reader_text)); | ||
222 | INIT_LIST_HEAD(&rp->e_list); | 221 | INIT_LIST_HEAD(&rp->e_list); |
223 | init_waitqueue_head(&rp->wait); | 222 | init_waitqueue_head(&rp->wait); |
224 | mutex_init(&rp->printf_lock); | 223 | mutex_init(&rp->printf_lock); |