aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/gigaset/common.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2006-10-30 01:46:35 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-30 15:08:40 -0500
commit70812522b847bdb8fabee963191734f5fa3143f3 (patch)
tree5e1c4372cfe9437a9a7eeaf65d627596299fbddf /drivers/isdn/gigaset/common.c
parent0e2d57fc6e7dabdbfdd4f26c861e7e6c75d5bdcf (diff)
[PATCH] isdn/gigaset: avoid cs->dev null pointer dereference
When gigaset_initbcs() is called, cs->dev is not initialized yet. If dev_alloc_skb() failed in this function, NULL poinster dereference will happen at dev_warn(). Cc: Kai Germaschewski <kai.germaschewski@gmx.de> Cc: Hansjoerg Lipp <hjlipp@web.de> Cc: Tilman Schmidt <tilman@imap.cc> Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/gigaset/common.c')
-rw-r--r--drivers/isdn/gigaset/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c
index aca165d43aa0..d8d256dadddf 100644
--- a/drivers/isdn/gigaset/common.c
+++ b/drivers/isdn/gigaset/common.c
@@ -616,7 +616,7 @@ static struct bc_state *gigaset_initbcs(struct bc_state *bcs,
616 } else if ((bcs->skb = dev_alloc_skb(SBUFSIZE + HW_HDR_LEN)) != NULL) 616 } else if ((bcs->skb = dev_alloc_skb(SBUFSIZE + HW_HDR_LEN)) != NULL)
617 skb_reserve(bcs->skb, HW_HDR_LEN); 617 skb_reserve(bcs->skb, HW_HDR_LEN);
618 else { 618 else {
619 dev_warn(cs->dev, "could not allocate skb\n"); 619 gig_dbg(DEBUG_INIT, "could not allocate skb\n");
620 bcs->inputstate |= INS_skip_frame; 620 bcs->inputstate |= INS_skip_frame;
621 } 621 }
622 622