Merge branch 'for-linus' of git://git.kernel.dk/linux-block
[linux-flexiantxendom0-3.2.10.git] / drivers / block / mtip32xx / mtip32xx.c
index 00f9fc9..304000c 100644 (file)
@@ -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;
 }