mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-29 22:06:39 +07:00
[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>
This commit is contained in:
parent
005eca5e74
commit
81065e2f41
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user