Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2088ca66 authored by Sagi Grimberg's avatar Sagi Grimberg Committed by Roland Dreier
Browse files

IB/srp: Check ib_query_gid return value



Detected by Coverity.

Signed-off-by: default avatarSagi Grimberg <sagig@mellanox.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent 67513605
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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 "