]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit0827370b3707bfb602b86ef2f64f01fbadbc05f9
treeba43116783d4c8c2a5462ed9e1320c7286827330
parent6e7dd1774724aa080c50ae8c5610f656ecd86202
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