mmc: core: refactor mmc_request_done()
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 28 Mar 2017 08:40:31 +0000 (10:40 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 24 Apr 2017 19:42:08 +0000 (21:42 +0200)
commit67b8360acc0d717c46af3008fc10dcc5c91f7745
treeb2f7a98956d701af190f0b045c308252620a0fa4
parent0e72f95bf329dea7985f0f4ac81cc888e8b79797
mmc: core: refactor mmc_request_done()

We have this construction:

if (a && b && !c)
   finalize;
else
   block;
   finalize;

Which is equivalent by boolean logic to:

if (!a || !b || c)
   block;
finalize;

Which is simpler code.

Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/core.c