net/mlx5: remove redundant objects in probe function
authorAdrien Mazarguil <adrien.mazarguil@6wind.com>
Tue, 10 Jul 2018 16:04:44 +0000 (18:04 +0200)
committerShahaf Shuler <shahafs@mellanox.com>
Wed, 11 Jul 2018 13:36:52 +0000 (15:36 +0200)
commit3ff4b0866fe22840994be631e552c9420204fc1e
treeb90af27933cbe3594b4aa40f3641936fd452988f
parent6057a10b3b9e2579f5b32c4fe01a4919b9ae0503
net/mlx5: remove redundant objects in probe function

This patch gets rid of redundant calls to open the device and query its
attributes in order to simplify the code.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Reviewed-by: Xueming Li <xuemingl@mellanox.com>
drivers/net/mlx5/mlx5.c