static void kill_all_decoders(int error)
{
- int i, j;
+ int i;
FOR_EACH_SLOT(i) {
- struct slot_info *s = &slot[i];
- struct audio_format_info *a;
+ struct slot_info *s = slot + i;
if (s->format < 0)
continue;
- a = afi + s->format;
- if (s->wns)
- for (j = 0; j < a->num_writers; j++)
- kill_btrn(s->wns[j].btrn, &s->wns[j].task, error);
- if (s->fns)
- for (j = 0; j < a->num_writers; j++)
- kill_btrn(s->fns[j].btrn, &s->wns[j].task, error);
- if (s->receiver_node)
- kill_btrn(s->receiver_node->btrn, &s->receiver_node->task,
+ if (!s->receiver_node)
+ continue;
+ kill_btrn(s->receiver_node->btrn, &s->receiver_node->task,
error);
}
}