projects
/
profile
/
ivi
/
kernel-x86-ivi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70617db
)
usb: gadget: omap_udc: kfree(NULL) is safe
author
Felipe Balbi
<balbi@ti.com>
Tue, 29 May 2012 11:38:32 +0000
(14:38 +0300)
committer
Felipe Balbi
<balbi@ti.com>
Sun, 3 Jun 2012 20:11:34 +0000
(23:11 +0300)
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>
drivers/usb/gadget/omap_udc.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/omap_udc.c
b/drivers/usb/gadget/omap_udc.c
index
f13bcdc
..
50e8490
100644
(file)
--- a/
drivers/usb/gadget/omap_udc.c
+++ b/
drivers/usb/gadget/omap_udc.c
@@
-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);
}
/*-------------------------------------------------------------------------*/