Skip to content

Commit

Permalink
[PATCH] zd1201 kmalloc size fix
Browse files Browse the repository at this point in the history
Noticed by Coverity checker.

(akpm: I stole this from Greg's tree and used the (IMO) tidier sizeof(*p)
construct).

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Alexey Dobriyan authored and Linus Torvalds committed Aug 23, 2005
1 parent 005eca5 commit 81065e2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/net/zd1201.c
Original file line number Diff line number Diff line change
Expand Up @@ -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*),
GFP_ATOMIC);
frag = kmalloc(sizeof(*frag), GFP_ATOMIC);
if (!frag)
goto resubmit;
skb = dev_alloc_skb(IEEE802_11_DATA_LEN +14+2);
Expand Down

0 comments on commit 81065e2

Please sign in to comment.