diff mbox series

Revert "ALSA: line6: sizeof (byte) is always 1, use that fact."

Message ID 20190725080348.2080-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series Revert "ALSA: line6: sizeof (byte) is always 1, use that fact." | expand

Commit Message

Chris Wilson July 25, 2019, 8:03 a.m. UTC
Just a heads up that icl is consistently showing

<4> [315.478830] snd_hda_intel 0000:00:1f.3: azx_get_response timeout, switching to polling mode: last cmd=0x202f8100
<4> [316.482799] snd_hda_intel 0000:00:1f.3: No response from codec, disabling MSI: last cmd=0x202f8100
<3> [508.412915] snd_hda_codec_hdmi hdaudioC0D2: Unable to sync register 0x2f8100. -11

following commits 2756d9143aa5 ("ALSA: hda - Fix intermittent CORB/RIRB
stall on Intel chips") and a30f1743e4f5 ("ALSA: line6: sizeof (byte) is
always 1, use that fact.")

Cc: Takashi Iwai <tiwai@suse.de>
---
 sound/usb/line6/driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/sound/usb/line6/driver.c b/sound/usb/line6/driver.c
index b5a3f754a4f1..ab2ec896f49c 100644
--- a/sound/usb/line6/driver.c
+++ b/sound/usb/line6/driver.c
@@ -342,7 +342,7 @@  int line6_read_data(struct usb_line6 *line6, unsigned address, void *data,
 	if (address > 0xffff || datalen > 0xff)
 		return -EINVAL;
 
-	len = kmalloc(1, GFP_KERNEL);
+	len = kmalloc(sizeof(*len), GFP_KERNEL);
 	if (!len)
 		return -ENOMEM;
 
@@ -418,7 +418,7 @@  int line6_write_data(struct usb_line6 *line6, unsigned address, void *data,
 	if (address > 0xffff || datalen > 0xffff)
 		return -EINVAL;
 
-	status = kmalloc(1, GFP_KERNEL);
+	status = kmalloc(sizeof(*status), GFP_KERNEL);
 	if (!status)
 		return -ENOMEM;