Skip to content

Commit

Permalink
mmc: core: Remove dead code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Philippe De Swert authored and Chris Ball committed May 10, 2012
1 parent 1c02f00 commit f6f4459
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/mmc/core/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

if (err || bw_ext_csd == NULL) {
if (bus_width != MMC_BUS_WIDTH_1)
err = -EINVAL;
err = -EINVAL;
goto out;
}

if (bus_width == MMC_BUS_WIDTH_1)
goto out;

/* only compare read only fields */
err = !((card->ext_csd.raw_partition_support ==
bw_ext_csd[EXT_CSD_PARTITION_SUPPORT]) &&
Expand Down

0 comments on commit f6f4459

Please sign in to comment.