diff mbox series

ALSA: emu10k1: delete an unnecessary condition

Message ID 20200605110134.GC978434@mwanda (mailing list archive)
State New, archived
Headers show
Series ALSA: emu10k1: delete an unnecessary condition | expand

Commit Message

Dan Carpenter June 5, 2020, 11:01 a.m. UTC
The "val" variable is an unsigned int so it's always <= UINT_MAX.  This
check is always true so it can be removed.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 sound/pci/emu10k1/emu10k1x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Takashi Iwai June 5, 2020, 3:57 p.m. UTC | #1
On Fri, 05 Jun 2020 13:01:34 +0200,
Dan Carpenter wrote:
> 
> The "val" variable is an unsigned int so it's always <= UINT_MAX.  This
> check is always true so it can be removed.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied, thanks.


Takashi
diff mbox series

Patch

diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c
index ddb7c2ce3f7c9..def8161cde4c2 100644
--- a/sound/pci/emu10k1/emu10k1x.c
+++ b/sound/pci/emu10k1/emu10k1x.c
@@ -1040,7 +1040,7 @@  static void snd_emu10k1x_proc_reg_write(struct snd_info_entry *entry,
 		if (sscanf(line, "%x %x %x", &reg, &channel_id, &val) != 3)
 			continue;
 
-		if (reg < 0x49 && val <= 0xffffffff && channel_id <= 2)
+		if (reg < 0x49 && channel_id <= 2)
 			snd_emu10k1x_ptr_write(emu, reg, channel_id, val);
 	}
 }