提交 f6f44590 编写于 作者: P Philippe De Swert 提交者: Chris Ball

mmc: core: Remove dead code

bus_width is passed to the function and when 0 (MMC_BUS_WIDTH_1)
will cause the function to return. So in in the second test it
definitely is different from 0, and the third test is redundant.
Signed-off-by: NPhilippe De Swert <philippedeswert@gmail.com>
Reviewed-by: NNamjae Jeon <linkinjeon@gmail.com>
Acked-by: NPhilip Rakity <prakity@marvell.com>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 1c02f000
...@@ -539,14 +539,10 @@ static int mmc_compare_ext_csds(struct mmc_card *card, unsigned bus_width) ...@@ -539,14 +539,10 @@ static int mmc_compare_ext_csds(struct mmc_card *card, unsigned bus_width)
err = mmc_get_ext_csd(card, &bw_ext_csd); err = mmc_get_ext_csd(card, &bw_ext_csd);
if (err || bw_ext_csd == NULL) { if (err || bw_ext_csd == NULL) {
if (bus_width != MMC_BUS_WIDTH_1) err = -EINVAL;
err = -EINVAL;
goto out; goto out;
} }
if (bus_width == MMC_BUS_WIDTH_1)
goto out;
/* only compare read only fields */ /* only compare read only fields */
err = !((card->ext_csd.raw_partition_support == err = !((card->ext_csd.raw_partition_support ==
bw_ext_csd[EXT_CSD_PARTITION_SUPPORT]) && bw_ext_csd[EXT_CSD_PARTITION_SUPPORT]) &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册