net/mlx5e: kTLS, Fix missing error unwind on unsupported cipher type
authorGal Pressman <gal@nvidia.com>
Tue, 24 Jan 2023 15:34:32 +0000 (17:34 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 15 Mar 2023 22:50:17 +0000 (15:50 -0700)
commitdd64572490c3d7aab04083db8791fab157a941ed
tree3712066978d808662f93e5319fa9a3d490233dc3
parentc9668f0b1d28570327dbba189f2c61f6f9e43ae7
net/mlx5e: kTLS, Fix missing error unwind on unsupported cipher type

Do proper error unwinding when adding an unsupported TX/RX cipher type.
Move the switch case prior to key creation so there's less to unwind,
and change the goto label name to describe the action performed instead
of what failed.

Fixes: 4960c414db35 ("net/mlx5e: Support 256 bit keys with kTLS device offload")
Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c