diff options
author | Philippe De Swert <philippedeswert@gmail.com> | 2012-04-11 16:32:05 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-05-09 20:47:49 -0400 |
commit | f6f44590f231cdf914ce740f3a53a6b815bf4767 (patch) | |
tree | 9c530896e81e0f7afbb413a12496ff05ca02d70d /drivers/mmc/core | |
parent | 1c02f000e78347aa51822feb189fcb0d90273958 (diff) |
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: Philippe De Swert <philippedeswert@gmail.com>
Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
Acked-by: Philip Rakity <prakity@marvell.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r-- | drivers/mmc/core/mmc.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 163046030773..2f0e11c9fd67 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c | |||
@@ -539,14 +539,10 @@ static int mmc_compare_ext_csds(struct mmc_card *card, unsigned bus_width) | |||
539 | err = mmc_get_ext_csd(card, &bw_ext_csd); | 539 | err = mmc_get_ext_csd(card, &bw_ext_csd); |
540 | 540 | ||
541 | if (err || bw_ext_csd == NULL) { | 541 | if (err || bw_ext_csd == NULL) { |
542 | if (bus_width != MMC_BUS_WIDTH_1) | 542 | err = -EINVAL; |
543 | err = -EINVAL; | ||
544 | goto out; | 543 | goto out; |
545 | } | 544 | } |
546 | 545 | ||
547 | if (bus_width == MMC_BUS_WIDTH_1) | ||
548 | goto out; | ||
549 | |||
550 | /* only compare read only fields */ | 546 | /* only compare read only fields */ |
551 | err = !((card->ext_csd.raw_partition_support == | 547 | err = !((card->ext_csd.raw_partition_support == |
552 | bw_ext_csd[EXT_CSD_PARTITION_SUPPORT]) && | 548 | bw_ext_csd[EXT_CSD_PARTITION_SUPPORT]) && |