* [PATCH] ALSA: ump: remove unnecessary check on blk
@ 2024-11-08 3:27 Luo Yifan
2024-11-08 14:07 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Luo Yifan @ 2024-11-08 3:27 UTC (permalink / raw)
To: perex, tiwai; +Cc: linux-sound, linux-kernel, Luo Yifan
The unsigned expression 'blk' will never be negative, so remove the
unnecessary check.
Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com>
---
sound/core/ump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/core/ump.c b/sound/core/ump.c
index cf22a17e3..af763939e 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))
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-08 14:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-08 3:27 [PATCH] ALSA: ump: remove unnecessary check on blk Luo Yifan
2024-11-08 14:07 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox