Messages in this thread | | | Date | Fri, 10 May 2024 19:06:13 -0700 | From | Jakub Kicinski <> | Subject | Re: [PATCH net v4] nfc: nci: Fix uninit-value in nci_rx_work |
| |
On Thu, 9 May 2024 20:30:33 +0900 Ryosuke Yasuoka wrote: > - if (!nci_plen(skb->data)) { > + if (!skb->len) { > kfree_skb(skb); > - kcov_remote_stop(); > - break; > + continue;
the change from break to continue looks unrelated
> }
> - nci_ntf_packet(ndev, skb); > + if (nci_valid_size(skb, NCI_CTRL_HDR_SIZE))
> + if (nci_valid_size(skb, NCI_DATA_HDR_SIZE))
#define NCI_CTRL_HDR_SIZE 3 #define NCI_DATA_HDR_SIZE 3
you can add a BUILD_BUG_ON(NCI_CTRL_HDR_SIZE == NCI_DATA_HDR_SIZE) and save all the code duplication.
| |