Re: [PATCH v2] net/mlx4_core: Fix error handling in mlx4_init_port_info.

2018-05-14 Thread David Miller
From: Tarick Bedeir Date: Sun, 13 May 2018 16:38:45 -0700 > Avoid exiting the function with a lingering sysfs file (if the first > call to device_create_file() fails while the second succeeds), and avoid > calling devlink_port_unregister() twice. > > In other words, either mlx4_init_port_info()

Re: [PATCH v2] net/mlx4_core: Fix error handling in mlx4_init_port_info.

2018-05-14 Thread Tariq Toukan
On 14/05/2018 2:38 AM, Tarick Bedeir wrote: Avoid exiting the function with a lingering sysfs file (if the first call to device_create_file() fails while the second succeeds), and avoid calling devlink_port_unregister() twice. In other words, either mlx4_init_port_info() succeeds and returns z

Re: [PATCH v2] net/mlx4_core: Fix error handling in mlx4_init_port_info.

2018-05-13 Thread Leon Romanovsky
On Sun, May 13, 2018 at 04:38:45PM -0700, Tarick Bedeir wrote: > Avoid exiting the function with a lingering sysfs file (if the first > call to device_create_file() fails while the second succeeds), and avoid > calling devlink_port_unregister() twice. > > In other words, either mlx4_init_port_info(

[PATCH v2] net/mlx4_core: Fix error handling in mlx4_init_port_info.

2018-05-13 Thread Tarick Bedeir
Avoid exiting the function with a lingering sysfs file (if the first call to device_create_file() fails while the second succeeds), and avoid calling devlink_port_unregister() twice. In other words, either mlx4_init_port_info() succeeds and returns zero, or it fails, returns non-zero, and requires