mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
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