Patchwork [net-next-2.6,3/3] caif: Add BUG_ON if dev_info is missing in packet

login
register
mail settings
Submitter sjur.brandeland@stericsson.com
Date April 11, 2011, 8:43 p.m.
Message ID <1302554632-13638-4-git-send-email-sjur.brandeland@stericsson.com>
Download mbox | patch
Permalink /patch/90651/
State Accepted
Delegated to: David Miller
Headers show

Comments

sjur.brandeland@stericsson.com - April 11, 2011, 8:43 p.m.
From: Sjur Brændeland <sjur.brandeland@stericsson.com>

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
---
 net/caif/cfmuxl.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/net/caif/cfmuxl.c b/net/caif/cfmuxl.c
index 2ca9806..6bb338d 100644
--- a/net/caif/cfmuxl.c
+++ b/net/caif/cfmuxl.c
@@ -188,7 +188,8 @@  static int cfmuxl_transmit(struct cflayer *layr, struct cfpkt *pkt)
 	u8 linkid;
 	struct cflayer *dn;
 	struct caif_payload_info *info = cfpkt_info(pkt);
-	dn = get_dn(muxl, cfpkt_info(pkt)->dev_info);
+	BUG_ON(!info);
+	dn = get_dn(muxl, info->dev_info);
 	if (dn == NULL) {
 		pr_warn("Send data on unknown phy ID = %d (0x%x)\n",
 			info->dev_info->id, info->dev_info->id);