diff options
| author | Jason Gunthorpe <jgg@mellanox.com> | 2019-01-20 10:30:25 +0200 |
|---|---|---|
| committer | Saeed Mahameed <saeedm@mellanox.com> | 2019-01-25 12:16:14 -0800 |
| commit | 71129676ab59dc63ba9e48a09a3386242a516751 (patch) | |
| tree | ff3374592eceeb202d49f563837da9a0e107c2c5 /include/linux/flex_array.h | |
| parent | 149e566fef8120a00c49f24e8f570186200e1e81 (diff) | |
| download | cachepc-linux-71129676ab59dc63ba9e48a09a3386242a516751.tar.gz cachepc-linux-71129676ab59dc63ba9e48a09a3386242a516751.zip | |
net/mlx5e: Return the allocated flow directly from __mlx5e_add_fdb_flow
This confusing construction confuses the compiler which can't see
that flow is initialized if !err:
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c: In function `mlx5e_configure_flower`
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:2727:28: warning:
`flow` may be used uninitialized in this function
[-Wmaybe-uninitialized]
There is no reason for two function outputs, just return the
pointer directly and use ERR_PTR to encode a failure.
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'include/linux/flex_array.h')
0 files changed, 0 insertions, 0 deletions
