Staging: iio/dds: double locking bugs
authorDan Carpenter <error27@gmail.com>
Sat, 13 Nov 2010 09:05:32 +0000 (12:05 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 16 Nov 2010 20:31:49 +0000 (12:31 -0800)
commit59a126418b96e9f5337d431e6024a8d50bbd6e4e
tree3d03d540673aeeefd703e6ba777b5726c44ed919
parenta1a26e492c4a90466cb3e064ccf69db4dd66d63a
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>
drivers/staging/iio/dds/ad9832.c
drivers/staging/iio/dds/ad9852.c
drivers/staging/iio/dds/ad9910.c
drivers/staging/iio/dds/ad9951.c