From: Huang Shijie Date: Tue, 8 Nov 2011 09:39:35 +0000 (+0800) Subject: ENGR00161643-3 UTP : bugfix X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-linux.git;a=commitdiff_plain;h=3518bfc228fe4f4c45804d2c92df3fa2b40ad47b ENGR00161643-3 UTP : bugfix The origin code lossed one line. fix it. Signed-off-by: Huang Shijie --- diff --git a/drivers/usb/gadget/function/fsl_updater.c b/drivers/usb/gadget/function/fsl_updater.c index 83333d1c16db..83dcd568efb5 100644 --- a/drivers/usb/gadget/function/fsl_updater.c +++ b/drivers/usb/gadget/function/fsl_updater.c @@ -134,6 +134,7 @@ static ssize_t utp_file_write(struct file *file, const char __user *buf, if (size < sizeof(uud->data)) return -EINVAL; uud = utp_user_data_alloc(size); + if (uud == NULL) return -ENOMEM; if (copy_from_user(&uud->data, buf, size)) { printk(KERN_INFO "[ %s ] copy error!\n", __func__);