write: Make get_btr_value() return void.
[paraslash.git] / oss_write.c
index 6ca1e16eaf62d33a54d58456d43779fb055c3bec..ea31fc8124aa84d374e3b7e48a32758a052b5352 100644 (file)
@@ -146,7 +146,6 @@ static void oss_post_select(__a_unused struct sched *s,
                struct task *t)
 {
        struct writer_node *wn = container_of(t, struct writer_node, task);
-       struct oss_write_args_info *conf = wn->conf;
        struct private_oss_write_data *powd = wn->private_data;
        struct btr_node *btrn = wn->btrn;
        size_t frames, bytes;
@@ -159,16 +158,8 @@ static void oss_post_select(__a_unused struct sched *s,
                return;
        if (powd->fd < 0) {
                int32_t rate, ch;
-               ret = -1;
-               if (!conf->sample_rate_given) /* config option trumps btr_exec */
-                       ret = get_btr_sample_rate(wn->btrn, &rate);
-               if (ret < 0)
-                       rate = conf->sample_rate_arg;
-               ret = -1;
-               if (!conf->channels_given)
-                       ret = get_btr_channels(wn->btrn, &ch);
-               if (ret < 0)
-                       ch = conf->channels_arg;
+               get_btr_sample_rate(btrn, &rate);
+               get_btr_channels(btrn, &ch);
                ret = oss_init(wn, rate, ch);
                if (ret < 0)
                        goto out;