]> git.baikalelectronics.ru Git - kernel.git/commit
iw_cxgb4: check return value of alloc_skb
authorPan Bian <bianpan2016@163.com>
Sun, 23 Apr 2017 09:09:11 +0000 (17:09 +0800)
committerDoug Ledford <dledford@redhat.com>
Fri, 28 Apr 2017 17:09:55 +0000 (13:09 -0400)
commit41ca71c60734bd6a2015dc5e4ab0520d4a7c7a7e
tree24a845ec47fad4a696d527530d93e2fcb97102da
parenta7b3305702efa188c8b17f3ce845f66ff1576acb
iw_cxgb4: check return value of alloc_skb

Function alloc_skb() will return a NULL pointer when there is no enough
memory. However, the return value of alloc_skb() is directly used
without validation in function send_fw_pass_open_req(). This patches
checks the return value of alloc_skb() against NULL.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/cxgb4/cm.c