net/mlx5: DR, Fix uninitialized var warning
authorYueHaibing <yuehaibing@huawei.com>
Thu, 10 Nov 2022 13:47:07 +0000 (21:47 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Dec 2022 10:28:40 +0000 (11:28 +0100)
commit34feea3bfb37e09b20b9891ad72a815ac7895bd8
tree18cd089cadcead9e689c2a6f9defbdaaba3c6208
parent3485ef2aabeb4b1c6e16cbbf8e43e3e7c8172a5f
net/mlx5: DR, Fix uninitialized var warning

[ Upstream commit 52f7cf70eb8fac6111786c59ae9dfc5cf2bee710 ]

Smatch warns this:

drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c:81
 mlx5dr_table_set_miss_action() error: uninitialized symbol 'ret'.

Initializing ret with -EOPNOTSUPP and fix missing action case.

Fixes: 7838e1725394 ("net/mlx5: DR, Expose steering table functionality")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c