mmc: block: Remove unnecessary temporary variable
authorTobias Klauser <tklauser@distanz.ch>
Wed, 21 Jan 2015 14:56:44 +0000 (15:56 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 28 Jan 2015 11:32:17 +0000 (12:32 +0100)
Directly return the result of mmc_blk_alloc_req() instead of assigning
and returning the variable md.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/card/block.c

index 8e1a60e0818d754dc1ee59028d760aea53a2796f..c69afb5e264e53976a3bf85a1bbd31d127668381 100644 (file)
@@ -2193,7 +2193,6 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,
 static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
 {
        sector_t size;
-       struct mmc_blk_data *md;
 
        if (!mmc_card_sd(card) && mmc_card_blockaddr(card)) {
                /*
@@ -2209,9 +2208,8 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
                size = card->csd.capacity << (card->csd.read_blkbits - 9);
        }
 
-       md = mmc_blk_alloc_req(card, &card->dev, size, false, NULL,
+       return mmc_blk_alloc_req(card, &card->dev, size, false, NULL,
                                        MMC_BLK_DATA_AREA_MAIN);
-       return md;
 }
 
 static int mmc_blk_alloc_part(struct mmc_card *card,