On 03/18/2012 09:46 PM, Joe Perches wrote:
On Sun, 2012-03-18 at 21:42 -0500, Larry Finger wrote:
The current version of rtlwifi for USB operations uses kmalloc to
acquire a 32-bit buffer for reading.
trivia:
+++ wireless-testing-new/drivers/net/wireless/rtlwifi/usb.c
[]
@@ -955,6 +947,13 @@ int __devinit rtl_usb_probe(struct usb_i
return -ENOMEM;
}
rtlpriv = hw->priv;
+ rtlpriv->usb_data = kzalloc(RTL_USB_MAX_RX_COUNT * sizeof(u32),
+ GFP_KERNEL);
+ if (!rtlpriv->usb_data) {
+ RT_ASSERT(false, "USB data buffer allocation failed\n");
The RT_ASSERT isn't really necessary as kzalloc already
does a dump_stack on allocation failure.
I thought it only dumped the stack when some form of kernel debugging was enabled.
Larry
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html