diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2005-08-22 22:11:09 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-23 20:44:30 +0200 |
commit | 81065e2f415af6c028eac13f481fb9e60a0b487b (patch) | |
tree | 6048dc99e2fd5cc19dc5057cbe5e1beb7f79996f /drivers | |
parent | [PATCH] md: make sure resync gets started when array starts. (diff) | |
download | linux-81065e2f415af6c028eac13f481fb9e60a0b487b.tar.xz linux-81065e2f415af6c028eac13f481fb9e60a0b487b.zip |
[PATCH] zd1201 kmalloc size fix
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>
Diffstat (limited to '')
-rw-r--r-- | drivers/usb/net/zd1201.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/net/zd1201.c b/drivers/usb/net/zd1201.c index 29cd801eb958..e32a80b39182 100644 --- a/drivers/usb/net/zd1201.c +++ b/drivers/usb/net/zd1201.c @@ -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); |