Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Saravanan Vajravel <saravanan.vajravel@broadcom.com>,
	jgg@ziepe.ca, linux-rdma@vger.kernel.org,
	Selvin Xavier <selvin.xavier@broadcom.com>,
	Kashyap Desai <kashyap.desai@broadcom.com>
Subject: Re: [PATCH v2 for-rc] RDMA/srpt: Add a check for valid 'mad_agent' pointer
Date: Sun, 9 Apr 2023 13:07:15 +0300	[thread overview]
Message-ID: <20230409100715.GH14869@unreal> (raw)
In-Reply-To: <659bfef6-c6d1-0316-60aa-215d8fd67c6a@acm.org>

On Thu, Apr 06, 2023 at 10:08:18AM -0700, Bart Van Assche wrote:
> On 4/5/23 21:25, Saravanan Vajravel wrote:
> > +		if (IS_ERR(mad_agent)) {
> >   			pr_err("%s-%d: MAD agent registration failed (%ld). Note: this is expected if SR-IOV is enabled.\n",
> >   			       dev_name(&sport->sdev->device->dev), sport->port,
> > -			       PTR_ERR(sport->mad_agent));
> > +			       PTR_ERR(mad_agent));
> >   			sport->mad_agent = NULL;
> >   			memset(&port_modify, 0, sizeof(port_modify));
> >   			port_modify.clr_port_cap_mask = IB_PORT_DEVICE_MGMT_SUP;
> >   			ib_modify_port(sport->sdev->device, sport->port, 0,
> >   				       &port_modify);
> > -
> > +		} else {
> > +			sport->mad_agent = mad_agent;
> >   		}
> >   	}
> 
> With an early return the 'else' clause wouldn't have been necessary. Anyway:
> 
> Reviewed-by: Bart Van Assche <bvanassche@acm.org>

Thanks, I fixed it locally and applied.

  reply	other threads:[~2023-04-09 10:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06  4:25 [PATCH v2 for-rc] RDMA/srpt: Add a check for valid 'mad_agent' pointer Saravanan Vajravel
2023-04-06 17:08 ` Bart Van Assche
2023-04-09 10:07   ` Leon Romanovsky [this message]
2023-04-09 10:06 ` Leon Romanovsky

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=20230409100715.GH14869@unreal \
    --to=leon@kernel.org \
    --cc=bvanassche@acm.org \
    --cc=jgg@ziepe.ca \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=saravanan.vajravel@broadcom.com \
    --cc=selvin.xavier@broadcom.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