net/mlx4: fix indirection table error rollback
authorAdrien Mazarguil <adrien.mazarguil@6wind.com>
Thu, 19 Oct 2017 16:11:07 +0000 (18:11 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 26 Oct 2017 00:33:01 +0000 (02:33 +0200)
commit0ef007c9394dc062a10992bc077b21e8048eafc0
treec534894a2c6a248eaa8d79f2a0bb0089ac23df2f
parent14f2d6688c1c9a1ac3fea27e3c66b9bc0f8f975d
net/mlx4: fix indirection table error rollback

In case of error occurring while setting up indirection table and
related RSS context resources, intermediate objects are not cleaned up.

Moreover although unlikely, an error other than EINVAL (e.g. ENOMEM)
may be returned.

A description of mlx4_rss_attach()'s return value is also missing.

Fixes: 078b8b452e6b ("net/mlx4: add RSS flow rule action support")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
drivers/net/mlx4/mlx4_rxq.c