summaryrefslogtreecommitdiff
path: root/xpp
diff options
context:
space:
mode:
Diffstat (limited to 'xpp')
-rw-r--r--xpp/xbus-core.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/xpp/xbus-core.c b/xpp/xbus-core.c
index f7b0a70..b346bd7 100644
--- a/xpp/xbus-core.c
+++ b/xpp/xbus-core.c
@@ -310,7 +310,7 @@ out:
static int xbus_poll(void *data)
{
int id;
- int ret;
+ int ret = 0;
unsigned long flags;
struct list_head *card;
struct list_head *next_card;
@@ -340,8 +340,8 @@ static int xbus_poll(void *data)
ret = CALL_PROTO(GLOBAL, DESC_REQ, xbus, NULL, id);
spin_lock_irqsave(&xbus->lock, flags);
if(ret < 0) {
- NOTICE("xpp: %s: Failed sending DESC_REQ to XPD #%d\n", __FUNCTION__, id);
- break;
+ ERR("xpp: %s: Failed sending DESC_REQ to XPD #%d\n", __FUNCTION__, id);
+ goto out;
}
mdelay(1); /* FIXME: debugging for Dima */
}
@@ -353,7 +353,7 @@ static int xbus_poll(void *data)
ret = wait_event_timeout(xbus->wait_for_polls, atomic_read(&xbus->count_poll_answers) >= MAX_XPDS, POLL_TIMEOUT);
if(ret < 0) {
ERR("%s: Poll timeout %d\n", xbus->busname, ret);
- return ret;
+ goto out;
}
DBG("%s: Poll finished. Start processing.\n", xbus->busname);
/*
@@ -410,8 +410,9 @@ static int xbus_poll(void *data)
card_detected(card_desc);
}
complete_all(&xbus->xpds_initialized);
+out:
up_read(&xbus->in_use);
- return 0;
+ return ret;
}