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>
This commit is contained in:
Родитель
6751360514
Коммит
2088ca66f5
|
@ -2649,7 +2649,9 @@ static ssize_t srp_create_target(struct device *dev,
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_free_mem;
|
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
|
shost_printk(KERN_DEBUG, target->scsi_host, PFX
|
||||||
"new target: id_ext %016llx ioc_guid %016llx pkey %04x "
|
"new target: id_ext %016llx ioc_guid %016llx pkey %04x "
|
||||||
|
|
Загрузка…
Ссылка в новой задаче