mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
[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 <[email protected]> Cc: Hansjoerg Lipp <[email protected]> Cc: Tilman Schmidt <[email protected]> Acked-by: Karsten Keil <[email protected]> Signed-off-by: Akinobu Mita <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
0e2d57fc6e
commit
70812522b8
1 changed files with 1 additions and 1 deletions
|
|
@ -616,7 +616,7 @@ static struct bc_state *gigaset_initbcs(struct bc_state *bcs,
|
|||
} else if ((bcs->skb = dev_alloc_skb(SBUFSIZE + HW_HDR_LEN)) != NULL)
|
||||
skb_reserve(bcs->skb, HW_HDR_LEN);
|
||||
else {
|
||||
dev_warn(cs->dev, "could not allocate skb\n");
|
||||
gig_dbg(DEBUG_INIT, "could not allocate skb\n");
|
||||
bcs->inputstate |= INS_skip_frame;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue