[PATCH] drivers: usb: gadget: udc: Fix NULL dereference

2015-03-03 Thread Tapasweni Pathak
it is then dereferenced as udc->dev. To fix these issues, shift assignment of udc by dereferencing ep after null check for _ep, replace both dev_dbg statements with pr_debug. Found using Coccinelle. Signed-off-by: Tapasweni Pathak Suggested-by : Julia Lawall Reviewed-by : Julia

[PATCH] usb: gadget: function: Replace GFP_KERNEL with GFP_ATOMIC

2015-02-20 Thread Tapasweni Pathak
To avoid deadlock, do not call blocking functions with spinlocks held. Replace GFP_KERNEL with GFP_ATOMIC, as the latter will fail if the heap doesn't have enough free pages but will not sleep and hence deadlock can be avoided. Found by Coccinelle. Signed-off-by: Tapasweni Pathak --- Is