Re: [PATCH 13/15] ib_srp: Allow SRP disconnect through sysfs

bart-LmZ/31Jx5xYUl6sPKNhdgg
2012-07-17T12:55:42Z

> On 03/25/2012 09:01 AM, Bart Van Assche wrote:
>> +static void srp_rport_delete(struct srp_rport *rport)
>> +{
>> + struct srp_target_port *target = rport->lld_data;
>> +
>> + BUG_ON(!target);
>> +
>
> I don't think this null check is needed, because below you set the
> lld_data before you call srp_rport_add which does the transport driver
> model/sysfs file addition for the rport. So I think the rport delete
> sysfs file won't show up before you set the lld_data.

Agreed. I'm fine with leaving that check out.

Bart.