Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161150
b: refs/heads/master
c: 19f97e3
h: refs/heads/master
v: v3
  • Loading branch information
Joe Eykholt authored and James Bottomley committed Sep 10, 2009
1 parent f1afb5d commit ff2be61
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 48f00902ba40d3e4467782a42258b952437a89f9
refs/heads/master: 19f97e3c0acc5eb03486044f5428395b7690a01a
9 changes: 3 additions & 6 deletions trunk/drivers/scsi/libfc/fc_disc.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,9 @@ static int fc_disc_new_target(struct fc_disc *disc,
ids->port_id != fc_host_port_id(lport->host) &&
ids->port_name != lport->wwpn) {
if (!rdata) {
rdata = lport->tt.rport_lookup(lport, ids->port_id);
if (!rdata) {
rdata = lport->tt.rport_create(lport, ids);
if (!rdata)
error = -ENOMEM;
}
rdata = lport->tt.rport_create(lport, ids);
if (!rdata)
error = -ENOMEM;
}
if (rdata) {
rdata->ops = &fc_disc_rport_ops;
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/scsi/libfc/fc_rport.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ static struct fc_rport_priv *fc_rport_create(struct fc_lport *lport,
{
struct fc_rport_priv *rdata;

rdata = lport->tt.rport_lookup(lport, ids->port_id);
if (rdata)
return rdata;

rdata = kzalloc(sizeof(*rdata), GFP_KERNEL);
if (!rdata)
return NULL;
Expand Down

0 comments on commit ff2be61

Please sign in to comment.