Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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>

authored by

Akinobu Mita and committed by
Linus Torvalds
70812522 0e2d57fc

+1 -1
+1 -1
drivers/isdn/gigaset/common.c
··· 616 616 } else if ((bcs->skb = dev_alloc_skb(SBUFSIZE + HW_HDR_LEN)) != NULL) 617 617 skb_reserve(bcs->skb, HW_HDR_LEN); 618 618 else { 619 - dev_warn(cs->dev, "could not allocate skb\n"); 619 + gig_dbg(DEBUG_INIT, "could not allocate skb\n"); 620 620 bcs->inputstate |= INS_skip_frame; 621 621 } 622 622