mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-29 21:06:41 +07:00
[PATCH] zd1211rw: Removes wrong assertions
Checking whether a mutex is not locked directly before mutex_lock() is called, doesn't make sense. The whole point of mutex_lock() is to block, if the mutex is locked. Signed-off-by: Ulrich Kunitz <kune@deine-taler.de> Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
cbb5e6bbb2
commit
44976c66bb
@ -249,7 +249,6 @@ int zd_ioread16(struct zd_chip *chip, zd_addr_t addr, u16 *value)
|
||||
{
|
||||
int r;
|
||||
|
||||
ZD_ASSERT(!mutex_is_locked(&chip->mutex));
|
||||
mutex_lock(&chip->mutex);
|
||||
r = zd_ioread16_locked(chip, value, addr);
|
||||
mutex_unlock(&chip->mutex);
|
||||
@ -260,7 +259,6 @@ int zd_ioread32(struct zd_chip *chip, zd_addr_t addr, u32 *value)
|
||||
{
|
||||
int r;
|
||||
|
||||
ZD_ASSERT(!mutex_is_locked(&chip->mutex));
|
||||
mutex_lock(&chip->mutex);
|
||||
r = zd_ioread32_locked(chip, value, addr);
|
||||
mutex_unlock(&chip->mutex);
|
||||
@ -271,7 +269,6 @@ int zd_iowrite16(struct zd_chip *chip, zd_addr_t addr, u16 value)
|
||||
{
|
||||
int r;
|
||||
|
||||
ZD_ASSERT(!mutex_is_locked(&chip->mutex));
|
||||
mutex_lock(&chip->mutex);
|
||||
r = zd_iowrite16_locked(chip, value, addr);
|
||||
mutex_unlock(&chip->mutex);
|
||||
@ -282,7 +279,6 @@ int zd_iowrite32(struct zd_chip *chip, zd_addr_t addr, u32 value)
|
||||
{
|
||||
int r;
|
||||
|
||||
ZD_ASSERT(!mutex_is_locked(&chip->mutex));
|
||||
mutex_lock(&chip->mutex);
|
||||
r = zd_iowrite32_locked(chip, value, addr);
|
||||
mutex_unlock(&chip->mutex);
|
||||
@ -294,7 +290,6 @@ int zd_ioread32v(struct zd_chip *chip, const zd_addr_t *addresses,
|
||||
{
|
||||
int r;
|
||||
|
||||
ZD_ASSERT(!mutex_is_locked(&chip->mutex));
|
||||
mutex_lock(&chip->mutex);
|
||||
r = zd_ioread32v_locked(chip, values, addresses, count);
|
||||
mutex_unlock(&chip->mutex);
|
||||
@ -306,7 +301,6 @@ int zd_iowrite32a(struct zd_chip *chip, const struct zd_ioreq32 *ioreqs,
|
||||
{
|
||||
int r;
|
||||
|
||||
ZD_ASSERT(!mutex_is_locked(&chip->mutex));
|
||||
mutex_lock(&chip->mutex);
|
||||
r = zd_iowrite32a_locked(chip, ioreqs, count);
|
||||
mutex_unlock(&chip->mutex);
|
||||
|
Loading…
Reference in New Issue
Block a user