aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/bcm
diff options
context:
space:
mode:
authorKevin McKinney <klmckinney1@gmail.com>2011-11-22 20:25:56 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-26 17:14:48 -0800
commitabe33fc0933f9221193fc047fbf93cf9db23c8f6 (patch)
treee4fbe028d8cd1c8c2799728a6bab176a7b5f9754 /drivers/staging/bcm
parentStaging: bcm: Remove unnecessary "do while" statement in, IOCTL_BCM_BUFFER_DOWNLOAD (diff)
downloadlinux-dev-abe33fc0933f9221193fc047fbf93cf9db23c8f6.tar.xz
linux-dev-abe33fc0933f9221193fc047fbf93cf9db23c8f6.zip
Staging: bcm: Fix semaphore locking bug in, IOCTL_BCM_BUFFER_DOWNLOAD
In this ioctl, we are testing to see if the lock is held. If it is not held, that means this ioctl used incorrectly. Therefore, we do not want to take the lock ourselves here. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/bcm')
-rw-r--r--drivers/staging/bcm/Bcmchar.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c
index 1bf28c95ef85..5a3e7c846a3e 100644
--- a/drivers/staging/bcm/Bcmchar.c
+++ b/drivers/staging/bcm/Bcmchar.c
@@ -796,6 +796,7 @@ cntrlEnd:
if (!down_trylock(&Adapter->fw_download_sema)) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
"Invalid way to download buffer. Use Start and then call this!!!\n");
+ up(&Adapter->fw_download_sema);
Status = -EINVAL;
break;
}