Change-Id: I5750a0da33aec22fde3050a9f3db4161196f8394
Signed-off-by: Kisang Lee <kisang80.lee@samsung.com>
name = kstrdup(page, GFP_KERNEL);
if (!name)
return -ENOMEM;
+
+ if(!len || (strlen(name) != len)) {
+ kfree(name);
+ return -EINVAL;
+ }
+
if (name[len - 1] == '\n')
name[len - 1] = '\0';
unsigned long flags;
bool uevent_sent = false;
+ if (!android_device && IS_ERR(android_device)) {
+ pr_info("usb: cannot send uevent because android_device not available \n");
+ return;
+ }
+
spin_lock_irqsave(&cdev->lock, flags);
if (cdev->config)
status[1] = true;
if (ret)
return ERR_PTR(ret);
- pr_info("KS : No waiting!!!\n");
-
func->conf = c;
func->gadget = c->cdev->gadget;