diff options
author | Kevin McKinney <klmckinney1@gmail.com> | 2011-11-22 20:25:56 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-26 17:14:48 -0800 |
commit | abe33fc0933f9221193fc047fbf93cf9db23c8f6 (patch) | |
tree | e4fbe028d8cd1c8c2799728a6bab176a7b5f9754 /drivers/staging/bcm/Bcmchar.c | |
parent | 77121d52a4de5e06c0b37d7e2fb9f6060904ecca (diff) | |
download | linux-abe33fc0933f9221193fc047fbf93cf9db23c8f6.tar.bz2 |
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/Bcmchar.c')
-rw-r--r-- | drivers/staging/bcm/Bcmchar.c | 1 |
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; } |