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

2018-05-13 Thread Tariq Toukan
On 02/05/2018 4:31 PM, Tariq Toukan wrote: On 27/04/2018 6:20 PM, 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,

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

2018-05-13 Thread Tariq Toukan
On 02/05/2018 4:31 PM, Tariq Toukan wrote: On 27/04/2018 6:20 PM, 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,

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

2018-05-02 Thread Tariq Toukan
On 27/04/2018 6:20 PM, 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

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

2018-05-02 Thread Tariq Toukan
On 27/04/2018 6:20 PM, 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

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

2018-04-27 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

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

2018-04-27 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