From: Luo Yifan Date: Fri, 8 Nov 2024 03:27:02 +0000 (+0800) Subject: ALSA: ump: remove unnecessary check on blk X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=eab936aa8500ea09fb3faad25af817221b8a5cb2;p=users%2Fdwmw2%2Flinux.git ALSA: ump: remove unnecessary check on blk The unsigned expression 'blk' will never be negative, so remove the unnecessary check. Signed-off-by: Luo Yifan Link: https://patch.msgid.link/20241108032702.217168-1-luoyifan@cmss.chinamobile.com Signed-off-by: Takashi Iwai --- diff --git a/sound/core/ump.c b/sound/core/ump.c index 7d59a0a9b037a..ab4932dc499f4 100644 --- a/sound/core/ump.c +++ b/sound/core/ump.c @@ -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))