Update to 2.6.32.41 Mainline
/drivers/staging/rtl8192su/r819xU_cmdpkt.c
blob:e2ba93e307578c4507daec1f816fc2cbc56d6f7b -> blob:071b5c60ac282a6c57838bbf15b0393f063a1e9e
--- drivers/staging/rtl8192su/r819xU_cmdpkt.c
+++ drivers/staging/rtl8192su/r819xU_cmdpkt.c
@@ -56,6 +56,12 @@ SendTxCommandPacket(
//Get TCB and local buffer from common pool. (It is shared by CmdQ, MgntQ, and USB coalesce DataQ)
skb = dev_alloc_skb(USB_HWDESC_HEADER_LEN + DataLen + 4);
+ if (skb == NULL) {
+ RT_TRACE(COMP_ERR, "(%s): unable to alloc skb buffer\n",
+ __func__);
+ rtStatus = false;
+ return rtStatus;
+ }
memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev));
tcb_desc = (cb_desc*)(skb->cb + MAX_DEV_ADDR_SIZE);
tcb_desc->queue_index = TXCMD_QUEUE;