Skip to content
Commit 942e7e5f authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller
Browse files

net/mlx4_core: fix incorrect size allocation for dev->caps.spec_qps

The current allocation for dev->caps.spec_qps is for the size of the
pointer and not the size of the actual  mlx4_spec_qps structure.  Fix
this by using the correct size.   Also splint allocation over a few
lines to make it cppcheck clean on overly wide lines.

Detected by CoverityScan, CID#1455222 ("Wrong sizeof argument")

Fixes: c73c8b1e

 ("net/mlx4_core: Dynamically allocate structs at mlx4_slave_cap")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarTariq Toukan <tariqt@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 542deb88
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment