Commit 81065e2f authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds
Browse files

[PATCH] zd1201 kmalloc size fix

Noticed by Coverity checker.

(akpm: I stole this from Greg's tree and used the (IMO) tidier sizeof(*p)
Signed-off-by: default avatarAlexey Dobriyan <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 005eca5e
......@@ -346,8 +346,7 @@ static void zd1201_usbrx(struct urb *urb, struct pt_regs *regs)
if (datalen<14)
goto resubmit;
if ((seq & IEEE802_11_SCTL_FRAG) == 0) {
frag = kmalloc(sizeof(struct zd1201_frag*),
frag = kmalloc(sizeof(*frag), GFP_ATOMIC);
if (!frag)
goto resubmit;
skb = dev_alloc_skb(IEEE802_11_DATA_LEN +14+2);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment