tree 6048dc99e2fd5cc19dc5057cbe5e1beb7f79996f
parent 005eca5e74b222db4360f8938140eb843d283325
author Alexey Dobriyan <[EMAIL PROTECTED]> Tue, 23 Aug 2005 03:11:09 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Wed, 24 Aug 2005 01:44:30 -0700

[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 <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 drivers/usb/net/zd1201.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/usb/net/zd1201.c b/drivers/usb/net/zd1201.c
--- a/drivers/usb/net/zd1201.c
+++ b/drivers/usb/net/zd1201.c
@@ -346,8 +346,7 @@ static void zd1201_usbrx(struct urb *urb
                        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);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to