kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ALSA: emu10k1: delete an unnecessary condition
@ 2020-06-05 11:01 Dan Carpenter
  2020-06-05 15:57 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2020-06-05 11:01 UTC (permalink / raw)
  To: Jaroslav Kysela
  Cc: Hariprasad Kelam, kernel-janitors, Takashi Iwai, alsa-devel

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(-)

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);
 	}
 }
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: emu10k1: delete an unnecessary condition
  2020-06-05 11:01 [PATCH] ALSA: emu10k1: delete an unnecessary condition Dan Carpenter
@ 2020-06-05 15:57 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2020-06-05 15:57 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Hariprasad Kelam, kernel-janitors, Takashi Iwai, alsa-devel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-05 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-05 11:01 [PATCH] ALSA: emu10k1: delete an unnecessary condition Dan Carpenter
2020-06-05 15:57 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).