The u->channels <= 0 check failed if the channels argument was not
given at all, making the whole module loading fail. I don't think the
check is necessary at all - negative values are not possible, and if
someone gives 0 as the argument, it's probably ok if we act as if
there was no channels argument at all.
goto fail;
}
- if (pa_modargs_get_value_u32(ma, "channels", &u->channels) < 0 ||
- u->channels <= 0 ||
- u->channels > PA_CHANNELS_MAX) {
+ if (pa_modargs_get_value_u32(ma, "channels", &u->channels) < 0 || u->channels > PA_CHANNELS_MAX) {
pa_log("Failed to parse channels= argument.");
goto fail;
}