diff options
Diffstat (limited to 'drivers/mmc/card/block.c')
-rw-r--r-- | drivers/mmc/card/block.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 86dbb366415a..43d9a5b53e8d 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -613,14 +613,19 @@ static struct mmc_driver mmc_driver = { | |||
613 | 613 | ||
614 | static int __init mmc_blk_init(void) | 614 | static int __init mmc_blk_init(void) |
615 | { | 615 | { |
616 | int res = -ENOMEM; | 616 | int res; |
617 | 617 | ||
618 | res = register_blkdev(MMC_BLOCK_MAJOR, "mmc"); | 618 | res = register_blkdev(MMC_BLOCK_MAJOR, "mmc"); |
619 | if (res) | 619 | if (res) |
620 | goto out; | 620 | goto out; |
621 | 621 | ||
622 | return mmc_register_driver(&mmc_driver); | 622 | res = mmc_register_driver(&mmc_driver); |
623 | if (res) | ||
624 | goto out2; | ||
623 | 625 | ||
626 | return 0; | ||
627 | out2: | ||
628 | unregister_blkdev(MMC_BLOCK_MAJOR, "mmc"); | ||
624 | out: | 629 | out: |
625 | return res; | 630 | return res; |
626 | } | 631 | } |