Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>

authored by

Peter Chen and committed by
Felipe Balbi
80d1642d 70237dc8

+3
+3
drivers/usb/gadget/function/f_rndis.c
··· 374 374 { 375 375 struct sk_buff *skb2; 376 376 377 + if (!skb) 378 + return NULL; 379 + 377 380 skb2 = skb_realloc_headroom(skb, sizeof(struct rndis_packet_msg_type)); 378 381 rndis_add_hdr(skb2); 379 382