isert: Fix potential overrun detected by coverity

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5870 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Yan Burman
2014-11-16 13:24:50 +00:00
parent 091bc739a7
commit 28781d1545
+1
View File
@@ -72,6 +72,7 @@ static int isert_buf_alloc_pg(struct ib_device *ib_dev,
res = ib_dma_map_sg(ib_dev, isert_buf->sg, isert_buf->sg_cnt, dma_dir);
if (unlikely(!res)) {
--i; /* do not overrun isert_buf->sg */
pr_err("Failed to DMA map iser sg:%p len:%d\n",
isert_buf->sg, isert_buf->sg_cnt);
res = -ENOMEM;