[PATCH 14/15] mci: cdev_find_free_index won't fail, no need to check
Sascha Hauer
s.hauer at pengutronix.de
Thu Feb 9 06:53:57 EST 2012
There will always be the next integer number unless we register
INT_MAX disk devices which is rarely the case.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/mci/mci-core.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 9c9ed48..c39faf3 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -1289,8 +1289,6 @@ static int mci_card_probe(struct mci *mci)
mci->blk.ops = &mci_ops;
rc = cdev_find_free_index("disk");
- if (rc == -1)
- pr_err("Cannot find a free number for the disk node\n");
mci->blk.cdev.name = asprintf("disk%d", rc);
mci->blk.blockbits = SECTOR_SHIFT;
--
1.7.9
More information about the barebox
mailing list