summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/function/f_uac1.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/function/f_uac1.c')
-rw-r--r--drivers/usb/gadget/function/f_uac1.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/gadget/function/f_uac1.c b/drivers/usb/gadget/function/f_uac1.c
index efe9f270b02d..58ada4855de8 100644
--- a/drivers/usb/gadget/function/f_uac1.c
+++ b/drivers/usb/gadget/function/f_uac1.c
@@ -451,7 +451,7 @@ static int audio_notify(struct g_audio *audio, int unit_id, int cs)
goto err_dec_int_count;
}
- msg = kmalloc(sizeof(*msg), GFP_ATOMIC);
+ msg = kmalloc_obj(*msg, GFP_ATOMIC);
if (msg == NULL) {
ret = -ENOMEM;
goto err_free_request;
@@ -1748,7 +1748,7 @@ static struct usb_function_instance *f_audio_alloc_inst(void)
{
struct f_uac1_opts *opts;
- opts = kzalloc(sizeof(*opts), GFP_KERNEL);
+ opts = kzalloc_obj(*opts, GFP_KERNEL);
if (!opts)
return ERR_PTR(-ENOMEM);
@@ -1831,7 +1831,7 @@ static struct usb_function *f_audio_alloc(struct usb_function_instance *fi)
struct f_uac1_opts *opts;
/* allocate and initialize one new instance */
- uac1 = kzalloc(sizeof(*uac1), GFP_KERNEL);
+ uac1 = kzalloc_obj(*uac1, GFP_KERNEL);
if (!uac1)
return ERR_PTR(-ENOMEM);