Merge "spcom: open channel return EBUSY when channel in use"
This commit is contained in:
commit
0b63aa5007
1 changed files with 4 additions and 2 deletions
|
@ -718,8 +718,10 @@ static int spcom_open(struct spcom_channel *ch, unsigned int timeout_msec)
|
||||||
|
|
||||||
/* only one client/server may use the channel */
|
/* only one client/server may use the channel */
|
||||||
if (ch->ref_count) {
|
if (ch->ref_count) {
|
||||||
pr_err("channel [%s] already in use.\n", name);
|
pr_err("channel [%s] is BUSY, already in use by pid [%d].\n",
|
||||||
goto exit_err;
|
name, ch->pid);
|
||||||
|
mutex_unlock(&ch->lock);
|
||||||
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
pr_debug("ch [%s] opened by PID [%d], count [%d]\n",
|
pr_debug("ch [%s] opened by PID [%d], count [%d]\n",
|
||||||
|
|
Loading…
Add table
Reference in a new issue