Re: [PATCH v2 for-rc] RDMA/srpt: Add a check for valid 'mad_agent' pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>

Thanks, I fixed it locally and applied.



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux