usb: fix adb aio buffer panic.
authorYue Wang <yue.wang@amlogic.com>
Thu, 8 Mar 2018 10:23:06 +0000 (18:23 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Fri, 9 Mar 2018 01:57:00 +0000 (17:57 -0800)
PD#161764: usb: fix adb aio buffer panic.

Change-Id: I32d2c45e28f09489f3f53d2935ab0cd1d7992ed0
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
drivers/usb/gadget/function/f_fs.c

index d32c0f5..cc1fbfc 100644 (file)
@@ -844,7 +844,9 @@ static void ffs_user_copy_worker(struct work_struct *work)
 
        if (io_data->read)
                kfree(io_data->to_free);
+#ifndef CONFIG_AMLOGIC_USB
        kfree(io_data->buf);
+#endif
        kfree(io_data);
 }