]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ALSA: ump: remove unnecessary check on blk
authorLuo Yifan <luoyifan@cmss.chinamobile.com>
Fri, 8 Nov 2024 03:27:02 +0000 (11:27 +0800)
committerTakashi Iwai <tiwai@suse.de>
Fri, 8 Nov 2024 14:07:33 +0000 (15:07 +0100)
The unsigned expression 'blk' will never be negative, so remove the
unnecessary check.

Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com>
Link: https://patch.msgid.link/20241108032702.217168-1-luoyifan@cmss.chinamobile.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/ump.c

index 7d59a0a9b037adf82670ea9026ebb4e6f4d006d0..ab4932dc499f4add27a4f31b5baef4240e175b65 100644 (file)
@@ -366,7 +366,7 @@ int snd_ump_block_new(struct snd_ump_endpoint *ump, unsigned int blk,
 {
        struct snd_ump_block *fb, *p;
 
-       if (blk < 0 || blk >= SNDRV_UMP_MAX_BLOCKS)
+       if (blk >= SNDRV_UMP_MAX_BLOCKS)
                return -EINVAL;
 
        if (snd_ump_get_block(ump, blk))