Commit 59ea9138 authored by Wang Weiyang's avatar Wang Weiyang Committed by Takashi Iwai

ALSA: seq: remove redundant unsigned comparison to zero

Since struct snd_ump_block_info::first_group is unsigned char, comparison
to zero is redundant
Signed-off-by: default avatarWang Weiyang <wangweiyang2@huawei.com>
Fixes: 81fd444a ("ALSA: seq: Bind UMP device")
Link: https://lore.kernel.org/r/20230721103124.18522-1-wangweiyang2@huawei.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 5f69c65e
...@@ -298,8 +298,7 @@ static void update_group_attrs(struct seq_ump_client *client) ...@@ -298,8 +298,7 @@ static void update_group_attrs(struct seq_ump_client *client)
} }
list_for_each_entry(fb, &client->ump->block_list, list) { list_for_each_entry(fb, &client->ump->block_list, list) {
if (fb->info.first_group < 0 || if (fb->info.first_group + fb->info.num_groups > SNDRV_UMP_MAX_GROUPS)
fb->info.first_group + fb->info.num_groups > SNDRV_UMP_MAX_GROUPS)
break; break;
group = &client->groups[fb->info.first_group]; group = &client->groups[fb->info.first_group];
for (i = 0; i < fb->info.num_groups; i++, group++) { for (i = 0; i < fb->info.num_groups; i++, group++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment