]> git.ipfire.org Git - thirdparty/kernel/stable.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>
Fri, 31 May 2019 13:45:15 +0000 (06:45 -0700)
commit1937f4f0b59e4a2638b97b8b5e2614ad7a7b9085
treef5c53843fd278ab8b3ff735fc259928e14400816
parent155599edd7afdda2c9641b294966040899050f3a
staging: mt7621-mmc: Initialize completions a single time during probe

[ Upstream commit 7ca8c2c8bbeda2a2a2a9898cd35066bc1dc83836 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/mt7621-mmc/sd.c