mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
UPSTREAM: usb: gadget: function: f_rndis: socket buffer may be NULL
In eth_start_xmit, the socket buffer may be NULL. So, add NULL pointer
check at .wrap API.
Change-Id: I635b804120f8b91bd84cfea268dc06af07d867ba
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
(cherry picked from commit 80d1642d76)
This commit is contained in:
committed by
Wenping Zhang
parent
3f40fb9196
commit
4aae5a78e9
@@ -384,6 +384,9 @@ static struct sk_buff *rndis_add_header(struct gether *port,
|
||||
{
|
||||
struct sk_buff *skb2;
|
||||
|
||||
if (!skb)
|
||||
return NULL;
|
||||
|
||||
skb2 = skb_realloc_headroom(skb, sizeof(struct rndis_packet_msg_type));
|
||||
rndis_add_hdr(skb2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user