Index: channels/sig_analog.c =================================================================== --- channels/sig_analog.c (revision 206802) +++ channels/sig_analog.c (working copy) @@ -289,10 +289,13 @@ static int analog_alloc_sub(struct analog_pvt *p, enum analog_sub x) { - p->subs[x].allocd = 1; - if (p->calls->allocate_sub) - return p->calls->allocate_sub(p->chan_pvt, x); - + if (p->calls->allocate_sub) { + int res = p->calls->allocate_sub(p->chan_pvt, x); + if (!res) { + p->subs[x].allocd = 1; + } + return res; + } return 0; }