mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
usb: gadget: omap_udc: kfree(NULL) is safe
we don't need to check for _req because kfree(NULL) is safe. Also, if someone actually passes a NULL pointer to be freed by usb_ep_free_request(), he deserves any issue he faces. Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
70617db7ad
commit
23673d7d26
1 changed files with 1 additions and 2 deletions
|
|
@ -282,8 +282,7 @@ omap_free_request(struct usb_ep *ep, struct usb_request *_req)
|
|||
{
|
||||
struct omap_req *req = container_of(_req, struct omap_req, req);
|
||||
|
||||
if (_req)
|
||||
kfree(req);
|
||||
kfree(req);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue