aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/card/block.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2015-01-21 09:56:44 -0500
committerUlf Hansson <ulf.hansson@linaro.org>2015-01-28 06:32:17 -0500
commit7a30f2affa4f7be87c0f6f1b69897a7ca9c4bad0 (patch)
tree662f1ff8a180bdc1f2eb22c1b8cc7cb684e0416c /drivers/mmc/card/block.c
parent862b5dcf9f2055ce6d1c9b0f6553079b7ee61b20 (diff)
mmc: block: Remove unnecessary temporary variable
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>
Diffstat (limited to 'drivers/mmc/card/block.c')
-rw-r--r--drivers/mmc/card/block.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 8e1a60e0818d..c69afb5e264e 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -2193,7 +2193,6 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,
2193static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card) 2193static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
2194{ 2194{
2195 sector_t size; 2195 sector_t size;
2196 struct mmc_blk_data *md;
2197 2196
2198 if (!mmc_card_sd(card) && mmc_card_blockaddr(card)) { 2197 if (!mmc_card_sd(card) && mmc_card_blockaddr(card)) {
2199 /* 2198 /*
@@ -2209,9 +2208,8 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
2209 size = card->csd.capacity << (card->csd.read_blkbits - 9); 2208 size = card->csd.capacity << (card->csd.read_blkbits - 9);
2210 } 2209 }
2211 2210
2212 md = mmc_blk_alloc_req(card, &card->dev, size, false, NULL, 2211 return mmc_blk_alloc_req(card, &card->dev, size, false, NULL,
2213 MMC_BLK_DATA_AREA_MAIN); 2212 MMC_BLK_DATA_AREA_MAIN);
2214 return md;
2215} 2213}
2216 2214
2217static int mmc_blk_alloc_part(struct mmc_card *card, 2215static int mmc_blk_alloc_part(struct mmc_card *card,