mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
ALSA: line6: sizeof (byte) is always 1, use that fact.
sizeof (byte) is always 1, use that fact and make interesting code explicit. Signed-off-by: Pavel Machek <pavel@denx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
d2d5a6b025
commit
a30f1743e4
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user