staging: wfx: wfx_flush() did not ensure that frames are processed
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Wed, 1 Apr 2020 11:04:02 +0000 (13:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2020 06:55:37 +0000 (08:55 +0200)
commit7f573a6fb1d848121a8793756a0d3a7949ee621d
tree1d2612952579523e0afe2991ace1ad73aa000763
parent4c6b3837c6dc0d9e5f9ec910da2e36349beea733
staging: wfx: wfx_flush() did not ensure that frames are processed

wfx_flush() exited once all frames are retrieved from the device.
However, it did not ensure they were processed by driver before to
return. Therefore, some frame may be processed after the interface has
disappear.

Change the place we signal that the queue is empty to fix that.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200401110405.80282-30-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/bh.c