]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ALSA: line6: sizeof (byte) is always 1, use that fact.
authorPavel Machek <pavel@denx.de>
Wed, 24 Jul 2019 09:52:54 +0000 (11:52 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 24 Jul 2019 13:03:50 +0000 (15:03 +0200)
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>
sound/usb/line6/driver.c

index ab2ec896f49c89bf60db609c915b277a42045161..b5a3f754a4f13e145e42172be822a2a4a1190dc7 100644 (file)
@@ -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;