caif: Allow cfpkt_extr_head to process empty message
Allow NULL pointer in cfpkt_extr_head in order to skip past header data. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7bc0f28c7a
commit
200c5a3b38
1 changed files with 2 additions and 1 deletions
|
@ -144,7 +144,8 @@ int cfpkt_extr_head(struct cfpkt *pkt, void *data, u16 len)
|
|||
}
|
||||
from = skb_pull(skb, len);
|
||||
from -= len;
|
||||
memcpy(data, from, len);
|
||||
if (data)
|
||||
memcpy(data, from, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue