diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-21 15:38:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-21 15:38:45 -0400 |
commit | 5c0a95c73f80c034914e219eee8075acdf56b527 (patch) | |
tree | b6c4eba6b5a1070a673159f14472de741535eb79 /drivers/mmc/card/block.c | |
parent | baaea1dc0befb7b64e6dbf2d1469d0a296a79e54 (diff) | |
parent | a650031a6bd16cb6789da9b3c27fc97341239f12 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
mmc_test: initialize mmc_test_lock statically
mmc_block: handle error from mmc_register_driver()
atmel-mci: Set MMC_CAP_NEEDS_POLL if no detect_pin
atmel-mci: Fix bogus debugfs file size
atmel-mci: Fix memory leak in atmci_regs_show
atmel-mci: debugfs: enable clock before dumping regs
tmio_mmc: fix compilation with debug enabled
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 6986f3926244..ebc8b9d77613 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -615,14 +615,19 @@ static struct mmc_driver mmc_driver = { | |||
615 | 615 | ||
616 | static int __init mmc_blk_init(void) | 616 | static int __init mmc_blk_init(void) |
617 | { | 617 | { |
618 | int res = -ENOMEM; | 618 | int res; |
619 | 619 | ||
620 | res = register_blkdev(MMC_BLOCK_MAJOR, "mmc"); | 620 | res = register_blkdev(MMC_BLOCK_MAJOR, "mmc"); |
621 | if (res) | 621 | if (res) |
622 | goto out; | 622 | goto out; |
623 | 623 | ||
624 | return mmc_register_driver(&mmc_driver); | 624 | res = mmc_register_driver(&mmc_driver); |
625 | if (res) | ||
626 | goto out2; | ||
625 | 627 | ||
628 | return 0; | ||
629 | out2: | ||
630 | unregister_blkdev(MMC_BLOCK_MAJOR, "mmc"); | ||
626 | out: | 631 | out: |
627 | return res; | 632 | return res; |
628 | } | 633 | } |