mci: cdev_find_free_index won't fail, no need to check
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@pengutronix.de>
This commit is contained in:
parent
3c7655c4ee
commit
5f6d792a78
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue