Skip to content

Commit

Permalink
IB/srp: Check ib_query_gid return value
Browse files Browse the repository at this point in the history
Detected by Coverity.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Roland Dreier <roland@purestorage.com>
  • Loading branch information
Sagi Grimberg authored and Roland Dreier committed Mar 24, 2014
1 parent 6751360 commit 2088ca6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/infiniband/ulp/srp/ib_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2649,7 +2649,9 @@ static ssize_t srp_create_target(struct device *dev,
if (ret)
goto err_free_mem;

ib_query_gid(ibdev, host->port, 0, &target->path.sgid);
ret = ib_query_gid(ibdev, host->port, 0, &target->path.sgid);
if (ret)
goto err_free_mem;

shost_printk(KERN_DEBUG, target->scsi_host, PFX
"new target: id_ext %016llx ioc_guid %016llx pkey %04x "
Expand Down

0 comments on commit 2088ca6

Please sign in to comment.