summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDurga Prasada Rao BATHINA <durgaprasadarao.b@stericcson.com>2011-08-24 19:34:19 +0530
committerPhilippe Langlais <philippe.langlais@stericsson.com>2011-12-06 11:01:15 +0100
commit7dd431c4691793b86b628a0d2f0f7a11416eaa93 (patch)
treee986d187dbba9aae900d1f2a2d24e91ef768098e
parent37467e539596eafa87e884e85da7237080dd13df (diff)
CAIF SHM: coverity issues
dereferencing NULL pointer,if skb_dequeue returns NULL. ST-Ericsson ID: 358051 ST-Ericsson Linux next: NA ST-Ericsson FOSS-OUT ID: NA Change-Id: Ib88648e68c631cc8eaf839f96af7e847c12922b1 Signed-off-by: Durga Prasada Rao BATHINA <durgaprasadarao.b@stericcson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31750 Reviewed-by: Bibek BASU <bibek.basu@stericsson.com> Tested-by: Bibek BASU <bibek.basu@stericsson.com>
-rw-r--r--drivers/net/caif/caif_shmcore.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/caif/caif_shmcore.c b/drivers/net/caif/caif_shmcore.c
index 27392cd05fd..7fe33417997 100644
--- a/drivers/net/caif/caif_shmcore.c
+++ b/drivers/net/caif/caif_shmcore.c
@@ -472,6 +472,8 @@ static void shm_tx_work_func(struct work_struct *tx_work)
}
skb = skb_dequeue(&pshm_drv->sk_qhead);
+ if (skb == NULL)
+ break;
/* Copy in CAIF frame. */
skb_copy_bits(skb, 0, pbuf->desc_vptr +
pbuf->frm_ofs + SHM_HDR_LEN +