mmc: core: Remove dead code
authorPhilippe De Swert <philippedeswert@gmail.com>
Wed, 11 Apr 2012 20:32:05 +0000 (23:32 +0300)
committerChris Ball <cjb@laptop.org>
Thu, 10 May 2012 00:47:49 +0000 (20:47 -0400)
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>
drivers/mmc/core/mmc.c

index 163046030773099ebaedf9a97cd11ef1786a5392..2f0e11c9fd67e0ac7147c534a144b05b377dc2c2 100644 (file)
@@ -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]) &&