summaryrefslogtreecommitdiff
path: root/drivers/block/mtip32xx/mtip32xx.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-05-20 21:53:04 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-20 21:53:04 -0400
commit17eea0df5f7068fc04959e655ef8f0a0ed097e19 (patch)
treed44b5cceb813dddfd1e62fe9f92556cf113d62fd /drivers/block/mtip32xx/mtip32xx.c
parent9b905fe68433378032b851c4d81a59187689fa52 (diff)
parent76e10d158efb6d4516018846f60c2ab5501900bc (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/block/mtip32xx/mtip32xx.c')
-rw-r--r--drivers/block/mtip32xx/mtip32xx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index 00f9fc992090..304000c3d433 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -2510,8 +2510,10 @@ static struct scatterlist *mtip_hw_get_scatterlist(struct driver_data *dd,
up(&dd->port->cmd_slot);
return NULL;
}
- if (unlikely(*tag < 0))
+ if (unlikely(*tag < 0)) {
+ up(&dd->port->cmd_slot);
return NULL;
+ }
return dd->port->commands[*tag].sg;
}