aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/usb.c
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2014-09-26 17:40:28 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-09-30 13:17:38 -0400
commitef09396ef622572c604d4977e76f6151ef68ed21 (patch)
tree3b4d123539b4446455112e4e74b21daa590db100 /drivers/net/wireless/rtlwifi/usb.c
parent557f933113a42a48ec617b81b5ea53fd7202b1ed (diff)
rtlwifi: rtl8188ee: rtl8723ae: rtl8821ae: Initialize some variables
In a number of places, kmalloc or valloc were used to acquire memory. To ensure that these locations are correctly initialized, the calls were changed to kzalloc and vzalloc. The change fixes a problem that was causing HT operations to be cancelled. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/usb.c')
-rw-r--r--drivers/net/wireless/rtlwifi/usb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index 0398d3ea15b0..10cf69c4bc42 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -75,11 +75,11 @@ static int _usbctrl_vendorreq_async_write(struct usb_device *udev, u8 request,
75 pipe = usb_sndctrlpipe(udev, 0); /* write_out */ 75 pipe = usb_sndctrlpipe(udev, 0); /* write_out */
76 reqtype = REALTEK_USB_VENQT_WRITE; 76 reqtype = REALTEK_USB_VENQT_WRITE;
77 77
78 dr = kmalloc(sizeof(*dr), GFP_ATOMIC); 78 dr = kzalloc(sizeof(*dr), GFP_ATOMIC);
79 if (!dr) 79 if (!dr)
80 return -ENOMEM; 80 return -ENOMEM;
81 81
82 databuf = kmalloc(databuf_maxlen, GFP_ATOMIC); 82 databuf = kzalloc(databuf_maxlen, GFP_ATOMIC);
83 if (!databuf) { 83 if (!databuf) {
84 kfree(dr); 84 kfree(dr);
85 return -ENOMEM; 85 return -ENOMEM;