staging: mt7621-mmc: Initialize completions a single time during probe
authorGeorge Hilliard <thirtythreeforty@gmail.com>
Wed, 27 Mar 2019 01:50:57 +0000 (19:50 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Mar 2019 14:39:31 +0000 (23:39 +0900)
commit7ca8c2c8bbeda2a2a2a9898cd35066bc1dc83836
treeba43116783d4c8c2a5462ed9e1320c7286827330
parent4195b4f11fbb5a103a81ee257d60d027695eebf6
staging: mt7621-mmc: Initialize completions a single time during probe

The module was initializing completions whenever it was going to wait on
them, and not when the completion was allocated.  This is incorrect
according to the completion docs:

    Calling init_completion() on the same completion object twice is
    most likely a bug [...]

Re-initialization is also unnecessary because the module never uses
complete_all().  Fix this by only ever initializing the completion a
single time, and log if the completions are not consumed as intended
(this is not a fatal problem, but should not go unnoticed).

Signed-off-by: George Hilliard <thirtythreeforty@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-mmc/sd.c