From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1RvSZs-0007Av-D4 for barebox@lists.infradead.org; Thu, 09 Feb 2012 11:54:16 +0000 From: Sascha Hauer Date: Thu, 9 Feb 2012 12:53:57 +0100 Message-Id: <1328788438-19717-15-git-send-email-s.hauer@pengutronix.de> In-Reply-To: <1328788438-19717-1-git-send-email-s.hauer@pengutronix.de> References: <1328788438-19717-1-git-send-email-s.hauer@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 14/15] mci: cdev_find_free_index won't fail, no need to check To: barebox@lists.infradead.org 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 --- 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 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox