From 1b8129479a0e8db491fc3a7bcca3be7623f54a78 Mon Sep 17 00:00:00 2001 From: Tomas Winkler Date: Tue, 11 Sep 2012 00:43:20 +0300 Subject: [PATCH] mei: add error messages for open count errors Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman --- drivers/misc/mei/main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index ae2cd0d52907..e8b0858132c1 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c @@ -239,12 +239,18 @@ static int mei_open(struct inode *inode, struct file *file) goto out_unlock; } err = -EMFILE; - if (dev->open_handle_count >= MEI_MAX_OPEN_HANDLE_COUNT) + if (dev->open_handle_count >= MEI_MAX_OPEN_HANDLE_COUNT) { + dev_err(&dev->pdev->dev, "open_handle_count exceded %d", + MEI_MAX_OPEN_HANDLE_COUNT); goto out_unlock; + } cl_id = find_first_zero_bit(dev->host_clients_map, MEI_CLIENTS_MAX); - if (cl_id >= MEI_CLIENTS_MAX) + if (cl_id >= MEI_CLIENTS_MAX) { + dev_err(&dev->pdev->dev, "client_id exceded %d", + MEI_CLIENTS_MAX) ; goto out_unlock; + } cl->host_client_id = cl_id; -- 2.20.1