diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2014-03-14 08:51:58 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-03-24 13:05:30 -0400 |
commit | 2088ca66f5e986c06dc1deb4e2f004218b652300 (patch) | |
tree | e9c9fe63b8f926fc28f7b24e33eddfa814dc4045 /drivers/infiniband | |
parent | 6751360514b604f2d69d00e64b5de0007e01e36e (diff) |
IB/srp: Check ib_query_gid return value
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>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/ulp/srp/ib_srp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 529b6bcdca7a..890322637e2e 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c | |||
@@ -2649,7 +2649,9 @@ static ssize_t srp_create_target(struct device *dev, | |||
2649 | if (ret) | 2649 | if (ret) |
2650 | goto err_free_mem; | 2650 | goto err_free_mem; |
2651 | 2651 | ||
2652 | ib_query_gid(ibdev, host->port, 0, &target->path.sgid); | 2652 | ret = ib_query_gid(ibdev, host->port, 0, &target->path.sgid); |
2653 | if (ret) | ||
2654 | goto err_free_mem; | ||
2653 | 2655 | ||
2654 | shost_printk(KERN_DEBUG, target->scsi_host, PFX | 2656 | shost_printk(KERN_DEBUG, target->scsi_host, PFX |
2655 | "new target: id_ext %016llx ioc_guid %016llx pkey %04x " | 2657 | "new target: id_ext %016llx ioc_guid %016llx pkey %04x " |