Skip to content

Commit

Permalink
ALSA: line6: sizeof (byte) is always 1, use that fact.
Browse files Browse the repository at this point in the history
sizeof (byte) is always 1, use that fact and make interesting code explicit.

Signed-off-by: Pavel Machek <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
Pavel Machek authored and tiwai committed Jul 24, 2019
1 parent d2d5a6b commit a30f174
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/usb/line6/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(sizeof(*len), GFP_KERNEL);
len = kmalloc(1, GFP_KERNEL);
if (!len)
return -ENOMEM;

Expand Down Expand Up @@ -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(sizeof(*status), GFP_KERNEL);
status = kmalloc(1, GFP_KERNEL);
if (!status)
return -ENOMEM;

Expand Down

0 comments on commit a30f174

Please sign in to comment.