diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2014-05-24 23:47:46 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-25 01:06:38 +0400 |
commit | ea5930f4e1328cad5893d4f0a90edb2ff5693206 (patch) | |
tree | 535f8378c85331d0b54e5877eb38cdd17339fb30 /drivers/net/team/team_mode_loadbalance.c | |
parent | 85d3fc9418dc5b357290de89b99c9a8bdd9eef89 (diff) | |
download | linux-ea5930f4e1328cad5893d4f0a90edb2ff5693206.tar.xz |
team: lb: use sizeof(*fprog) in __fprog_create
sock_fprog and sock_fprog_kern are of equal size, however
it's cleaner to just use sizeof(*fprog) instead to always
have correct type.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/team/team_mode_loadbalance.c')
-rw-r--r-- | drivers/net/team/team_mode_loadbalance.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/team/team_mode_loadbalance.c b/drivers/net/team/team_mode_loadbalance.c index 0a6ee07bf0af..a58dfebb5512 100644 --- a/drivers/net/team/team_mode_loadbalance.c +++ b/drivers/net/team/team_mode_loadbalance.c @@ -249,7 +249,7 @@ static int __fprog_create(struct sock_fprog_kern **pfprog, u32 data_len, if (data_len % sizeof(struct sock_filter)) return -EINVAL; - fprog = kmalloc(sizeof(struct sock_fprog), GFP_KERNEL); + fprog = kmalloc(sizeof(*fprog), GFP_KERNEL); if (!fprog) return -ENOMEM; fprog->filter = kmemdup(filter, data_len, GFP_KERNEL); |