From: Alexey Dobriyan Date: Mon, 22 Aug 2005 20:11:09 +0000 (-0700) Subject: [PATCH] zd1201 kmalloc size fix X-Git-Tag: MMI-PSA29.97-13-9~56297 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=81065e2f415af6c028eac13f481fb9e60a0b487b;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [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 Signed-off-by: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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);