isert: Properly propagate portal creation error to iscsi-scstd (merge r6004 from iser)

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.0.x-iser@6014 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Yan Burman
2015-01-28 13:49:24 +00:00
parent 66523c09ff
commit b063927262
2 changed files with 3 additions and 8 deletions

View File

@@ -92,12 +92,7 @@ out:
void *isert_portal_add(struct sockaddr *saddr, size_t addr_len)
{
struct isert_portal *portal = isert_portal_start(saddr, addr_len);
if (IS_ERR(portal))
portal = NULL;
return portal;
return isert_portal_start(saddr, addr_len);
}
int isert_portal_remove(void *portal_h)

View File

@@ -410,10 +410,10 @@ static long isert_listen_ioctl(struct file *filp, unsigned int cmd,
portal = isert_portal_add((struct sockaddr *)&dev->info.addr,
dev->info.addr_len);
if (!portal) {
if (IS_ERR(portal)) {
PRINT_ERROR("Unable to add portal of size %zu\n",
dev->info.addr_len);
res = -EINVAL;
res = PTR_ERR(portal);
goto out;
}
dev->portal_h[dev->free_portal_idx++] = portal;