qcacmn: Resolve KW issues

Add NULL check for nbuf_clone after calling
qdf_nbuf_clone

Change-Id: Ibffff984b0ace3c5ea19fb72f0e56e041eba0b14
CRs-Fixed: 2209137
This commit is contained in:
Ruchi, Agrawal 2018-03-19 13:53:07 +05:30 • committed by nshrivas
commit 1ca70f07c8

View file

@ -971,17 +971,21 @@ static bool dp_cce_classify(struct dp_vdev *vdev, qdf_nbuf_t nbuf)
ether_type = *(uint16_t *)(nbuf->data + 2*ETHER_ADDR_LEN +
sizeof(*llcHdr));
nbuf_clone = qdf_nbuf_clone(nbuf);
qdf_nbuf_pull_head(nbuf_clone, sizeof(*llcHdr));
if (qdf_unlikely(nbuf_clone)) {
qdf_nbuf_pull_head(nbuf_clone, sizeof(*llcHdr));
if (ether_type == htons(ETHERTYPE_8021Q)) {
qdf_nbuf_pull_head(nbuf_clone,
if (ether_type == htons(ETHERTYPE_8021Q)) {
qdf_nbuf_pull_head(nbuf_clone,
sizeof(qdf_net_vlanhdr_t));
}
}
} else {
if (ether_type == htons(ETHERTYPE_8021Q)) {
nbuf_clone = qdf_nbuf_clone(nbuf);
qdf_nbuf_pull_head(nbuf_clone,
if (qdf_unlikely(nbuf_clone)) {
qdf_nbuf_pull_head(nbuf_clone,
sizeof(qdf_net_vlanhdr_t));
}
}
}