mmc: block: Move duplicate check
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 20 Aug 2017 21:39:09 +0000 (23:39 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 30 Aug 2017 13:03:39 +0000 (15:03 +0200)
commit61fe0e2bdac51f94f9114ff1b2caef1c75db3679
treec7aa6766e3d5306bfc0e73a40344af3d69e7bd1d
parent627c3ccfb46ada2583eac434127ad5d75e1ac33c
mmc: block: Move duplicate check

mmc_blk_ioctl() calls either mmc_blk_ioctl_cmd() or
mmc_blk_ioctl_multi_cmd() and each of these make the same
check. Factor it into a new helper function, call it on
both branches of the switch() statement and save a chunk
of duplicate code.

Cc: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/block.c