All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Tarick Bedeir <tarick@google.com>
Cc: tariqt@mellanox.com, gthelen@google.com, netdev@vger.kernel.org,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] net/mlx4_core: Fix error handling in mlx4_init_port_info.
Date: Mon, 14 May 2018 09:21:09 +0300	[thread overview]
Message-ID: <20180514062109.GK10381@mtr-leonro.mtl.com> (raw)
In-Reply-To: <20180513233845.135290-1-tarick@google.com>

[-- Attachment #1: Type: text/plain, Size: 709 bytes --]

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() succeeds and returns zero, or
> it fails, returns non-zero, and requires no cleanup.
>
> Fixes: 096335b3f983 ("mlx4_core: Allow dynamic MTU configuration for IB
> ports")

Please don't break "Fixes" lines, it complicates "grep".

IMHO, general cleanup exit point is needed in this function (goto ...),
but your fix is good enough too. Thanks for doing it.

Reviewed-by: Leon Romanovsky <leonro@mellanox.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

  reply	other threads:[~2018-05-14  6:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-13 23:38 [PATCH v2] net/mlx4_core: Fix error handling in mlx4_init_port_info Tarick Bedeir
2018-05-13 23:38 ` Tarick Bedeir
2018-05-14  6:21 ` Leon Romanovsky [this message]
2018-05-14  9:08 ` Tariq Toukan
2018-05-14 20:29 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180514062109.GK10381@mtr-leonro.mtl.com \
    --to=leon@kernel.org \
    --cc=gthelen@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tarick@google.com \
    --cc=tariqt@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.