projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
mtip32xx: release the semaphore on an error path
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
block
/
mtip32xx
/
mtip32xx.c
diff --git
a/drivers/block/mtip32xx/mtip32xx.c
b/drivers/block/mtip32xx/mtip32xx.c
index 00f9fc992090099e72e8f753ab9d58fe47154b46..304000c3d433f1d98afe6c0f0feea8553dc7bd04 100644
(file)
--- 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;
}