mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 07:13:34 +00:00
usb: usbip: remove null check
The only caller of get_gadget_descs() has already dereferenced udc before calling this function, so udc can not be NULL at this point of the code and hence no use of checking it. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
600bb21605
commit
7c348f1cfb
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ int get_gadget_descs(struct vudc *udc)
|
|||
struct usb_ctrlrequest req;
|
||||
int ret;
|
||||
|
||||
if (!udc || !udc->driver || !udc->pullup)
|
||||
if (!udc->driver || !udc->pullup)
|
||||
return -EINVAL;
|
||||
|
||||
req.bRequestType = USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_DEVICE;
|
||||
|
|
Loading…
Reference in a new issue