diff options
author | Dan Carpenter <error27@gmail.com> | 2010-11-13 09:05:32 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-16 20:31:49 (GMT) |
commit | 59a126418b96e9f5337d431e6024a8d50bbd6e4e (patch) | |
tree | 3d03d540673aeeefd703e6ba777b5726c44ed919 /drivers/staging/iio/dds/ad9832.c | |
parent | a1a26e492c4a90466cb3e064ccf69db4dd66d63a (diff) | |
download | linux-fsl-qoriq-59a126418b96e9f5337d431e6024a8d50bbd6e4e.tar.xz |
Staging: iio/dds: double locking bugs
This is a static checker patch and I don't have this hardware.
This code is unusual because while I've often seen a double lock, this
is the first time I've seen code that takes a lock 11 times in a row. I
feel like I must have missed something. But I've looked very carefully
I don't see any way the original code is correct. Does spi_sync()
somehow release the lock in a way that I can't see? Even if it does,
the locking would still be wrong.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/dds/ad9832.c')
-rw-r--r-- | drivers/staging/iio/dds/ad9832.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/staging/iio/dds/ad9832.c b/drivers/staging/iio/dds/ad9832.c index a4bb048..e911893 100644 --- a/drivers/staging/iio/dds/ad9832.c +++ b/drivers/staging/iio/dds/ad9832.c @@ -166,8 +166,6 @@ static void ad9832_init(struct ad9832_state *st) config = 0x3 << 14; - mutex_lock(&st->lock); - xfer.len = 2; xfer.tx_buf = &config; |