diff options
author | Felipe Balbi <balbi@ti.com> | 2012-05-29 07:38:32 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-06-03 16:11:34 -0400 |
commit | 23673d7d26d81bd17cde3ed74c57b3f39585325f (patch) | |
tree | e269bf56ca6bdd6a1e40ddba6ee42f70798e93b5 /drivers/usb/gadget/omap_udc.c | |
parent | 70617db7ad7395498e6bc54c634199bf895426c6 (diff) |
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>
Diffstat (limited to 'drivers/usb/gadget/omap_udc.c')
-rw-r--r-- | drivers/usb/gadget/omap_udc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c index f13bcdc75676..50e8490867ed 100644 --- 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) | |||
282 | { | 282 | { |
283 | struct omap_req *req = container_of(_req, struct omap_req, req); | 283 | struct omap_req *req = container_of(_req, struct omap_req, req); |
284 | 284 | ||
285 | if (_req) | 285 | kfree(req); |
286 | kfree(req); | ||
287 | } | 286 | } |
288 | 287 | ||
289 | /*-------------------------------------------------------------------------*/ | 288 | /*-------------------------------------------------------------------------*/ |