From: Eli Cohen <eli@dev.mellanox.co.il>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Roland Dreier <roland@kernel.org>,
Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>,
linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] IB/mlx5: fix error code in get_port_caps()
Date: Mon, 12 Jan 2015 08:54:57 +0000 [thread overview]
Message-ID: <20150112085457.GA5319@mtldesk30> (raw)
In-Reply-To: <20150112081429.GA11818@mwanda>
Acked-by: Eli Cohen <eli@mellanox.com>
Thanks!
On Mon, Jan 12, 2015 at 11:14:29AM +0300, Dan Carpenter wrote:
> We should return -ENOMEM on allocation failure instead of success.
>
> Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
> index 8a87404..cc4ac1e 100644
> --- a/drivers/infiniband/hw/mlx5/main.c
> +++ b/drivers/infiniband/hw/mlx5/main.c
> @@ -997,7 +997,7 @@ static int get_port_caps(struct mlx5_ib_dev *dev)
> struct ib_device_attr *dprops = NULL;
> struct ib_port_attr *pprops = NULL;
> struct mlx5_general_caps *gen;
> - int err = 0;
> + int err = -ENOMEM;
> int port;
>
> gen = &dev->mdev->caps.gen;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2015-01-12 8:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-12 8:14 [patch] IB/mlx5: fix error code in get_port_caps() Dan Carpenter
2015-01-12 8:35 ` Julia Lawall
2015-01-12 8:56 ` [patch v2] " Dan Carpenter
2015-01-12 8:54 ` Eli Cohen [this message]
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=20150112085457.GA5319@mtldesk30 \
--to=eli@dev.mellanox.co.il \
--cc=dan.carpenter@oracle.com \
--cc=hal.rosenstock@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=roland@kernel.org \
--cc=sean.hefty@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).