* [PATCH][next] net/mlx5: fix missing assignment of variable err
@ 2019-09-04 19:29 ` Colin King
0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2019-09-04 19:29 UTC (permalink / raw)
To: Maor Gottlieb, Saeed Mahameed, Leon Romanovsky, David S . Miller,
netdev, linux-rdma
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The error return from a call to mlx5_flow_namespace_set_peer is not
being assigned to variable err and hence the error check following
the call is currently not working. Fix this by assigning ret as
intended.
Addresses-Coverity: ("Logically dead code")
Fixes: 8463daf17e80 ("net/mlx5: Add support to use SMFS in switchdev mode")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index afa623b15a38..00d71db15f22 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -1651,7 +1651,7 @@ static int mlx5_esw_offloads_set_ns_peer(struct mlx5_eswitch *esw,
if (err)
return err;
- mlx5_flow_namespace_set_peer(peer_ns, ns);
+ err = mlx5_flow_namespace_set_peer(peer_ns, ns);
if (err) {
mlx5_flow_namespace_set_peer(ns, NULL);
return err;
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH][next] net/mlx5: fix missing assignment of variable err
@ 2019-09-04 19:29 ` Colin King
0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2019-09-04 19:29 UTC (permalink / raw)
To: Maor Gottlieb, Saeed Mahameed, Leon Romanovsky, David S . Miller,
netdev, linux-rdma
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The error return from a call to mlx5_flow_namespace_set_peer is not
being assigned to variable err and hence the error check following
the call is currently not working. Fix this by assigning ret as
intended.
Addresses-Coverity: ("Logically dead code")
Fixes: 8463daf17e80 ("net/mlx5: Add support to use SMFS in switchdev mode")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index afa623b15a38..00d71db15f22 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -1651,7 +1651,7 @@ static int mlx5_esw_offloads_set_ns_peer(struct mlx5_eswitch *esw,
if (err)
return err;
- mlx5_flow_namespace_set_peer(peer_ns, ns);
+ err = mlx5_flow_namespace_set_peer(peer_ns, ns);
if (err) {
mlx5_flow_namespace_set_peer(ns, NULL);
return err;
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH][next] net/mlx5: fix missing assignment of variable err
2019-09-04 19:29 ` Colin King
@ 2019-09-04 23:30 ` Saeed Mahameed
-1 siblings, 0 replies; 4+ messages in thread
From: Saeed Mahameed @ 2019-09-04 23:30 UTC (permalink / raw)
To: linux-rdma, Maor Gottlieb, colin.king, davem, leon, netdev
Cc: kernel-janitors, linux-kernel
On Wed, 2019-09-04 at 20:29 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The error return from a call to mlx5_flow_namespace_set_peer is not
> being assigned to variable err and hence the error check following
> the call is currently not working. Fix this by assigning ret as
> intended.
>
> Addresses-Coverity: ("Logically dead code")
> Fixes: 8463daf17e80 ("net/mlx5: Add support to use SMFS in switchdev
> mode")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
Applied to net-next-mlx5.
I have a cleanup series coming up, will send it all together to
net-next soon.
Thanks,
Saeed.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][next] net/mlx5: fix missing assignment of variable err
@ 2019-09-04 23:30 ` Saeed Mahameed
0 siblings, 0 replies; 4+ messages in thread
From: Saeed Mahameed @ 2019-09-04 23:30 UTC (permalink / raw)
To: linux-rdma, Maor Gottlieb, colin.king, davem, leon, netdev
Cc: kernel-janitors, linux-kernel
T24gV2VkLCAyMDE5LTA5LTA0IGF0IDIwOjI5ICswMTAwLCBDb2xpbiBLaW5nIHdyb3RlOg0KPiBG
cm9tOiBDb2xpbiBJYW4gS2luZyA8Y29saW4ua2luZ0BjYW5vbmljYWwuY29tPg0KPiANCj4gVGhl
IGVycm9yIHJldHVybiBmcm9tIGEgY2FsbCB0byBtbHg1X2Zsb3dfbmFtZXNwYWNlX3NldF9wZWVy
IGlzIG5vdA0KPiBiZWluZyBhc3NpZ25lZCB0byB2YXJpYWJsZSBlcnIgYW5kIGhlbmNlIHRoZSBl
cnJvciBjaGVjayBmb2xsb3dpbmcNCj4gdGhlIGNhbGwgaXMgY3VycmVudGx5IG5vdCB3b3JraW5n
LiAgRml4IHRoaXMgYnkgYXNzaWduaW5nIHJldCBhcw0KPiBpbnRlbmRlZC4NCj4gDQo+IEFkZHJl
c3Nlcy1Db3Zlcml0eTogKCJMb2dpY2FsbHkgZGVhZCBjb2RlIikNCj4gRml4ZXM6IDg0NjNkYWYx
N2U4MCAoIm5ldC9tbHg1OiBBZGQgc3VwcG9ydCB0byB1c2UgU01GUyBpbiBzd2l0Y2hkZXYNCj4g
bW9kZSIpDQo+IFNpZ25lZC1vZmYtYnk6IENvbGluIElhbiBLaW5nIDxjb2xpbi5raW5nQGNhbm9u
aWNhbC5jb20+DQo+IC0tLQ0KDQpBcHBsaWVkIHRvIG5ldC1uZXh0LW1seDUuDQoNCkkgaGF2ZSBh
IGNsZWFudXAgc2VyaWVzIGNvbWluZyB1cCwgd2lsbCBzZW5kIGl0IGFsbCB0b2dldGhlciB0byAN
Cm5ldC1uZXh0IHNvb24uIA0KDQpUaGFua3MsDQpTYWVlZC4NCg=
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-09-04 23:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 19:29 [PATCH][next] net/mlx5: fix missing assignment of variable err Colin King
2019-09-04 19:29 ` Colin King
2019-09-04 23:30 ` Saeed Mahameed
2019-09-04 23:30 ` Saeed Mahameed
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.