]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: omap_udc: remove possiblity of NULL pointer de-reference
authorFelipe Balbi <balbi@ti.com>
Tue, 29 May 2012 11:36:42 +0000 (14:36 +0300)
committerFelipe Balbi <balbi@ti.com>
Sun, 3 Jun 2012 20:11:33 +0000 (23:11 +0300)
commit2ba9ef2014ca5836008203e1cae4552946fcdf46
tree2f3b5fef60c3e25e753347cca184131dcaaa4177
parentdb6bc7638f81d65d6c26b8e469f133ba6cfe8f1f
usb: gadget: omap_udc: remove possiblity of NULL pointer de-reference

when allocating a request, it's better programming
practice to make sure we return NULL if allocation
failed.

This will ensure that, if struct usb_request isn't
the first member on our structure, we don't cheat
the gadget driver into thinking allocating worked
because pointer isn't 0.

Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/omap_udc.c