diff options
author | Or Gerlitz <ogerlitz@mellanox.com> | 2016-06-09 17:07:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-10 01:06:26 -0400 |
commit | 3f42ac6648723e906c1c10edc0c523aff29963cc (patch) | |
tree | d90a8909a9294f829523e63764c9caf29b1839cf /net/core | |
parent | 3fe3d819d5015d56d0d7289ae16db5e612640c5b (diff) |
net/mlx5: E-Switch, Use the correct error check on returned pointers
The mlx5 flow-steering API (mlx5_create_flow_table/group/rule) never
returns null pointer on error. Even if it was doing that, checking
for IS_ERR_OR_NULL(p) and then returning PTR_ERR(p) would have cause
bugs, since PTR_ERR(NULL) --> success, crash.
To make things more robust and protect against related future bugs,
convert all IS_ERR_OR_NULL checks on returned values to IS_ERR.
Fixes: 5742df0f7dbe ('net/mlx5: E-Switch, Introduce VST vport ingress/egress ACLs')
Fixes: 86d722ad2c3b ('net/mlx5: Use flow steering infrastructure for mlx5_en')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reported-by: Ilya Lesokhin <ilyal@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
0 files changed, 0 insertions, 0 deletions