Merge "ODROID-N2: usb/gadget: validate null pointer of usb device" into odroidn2-4.9.y-android

This commit is contained in:
Chris Kim
2019-08-12 11:40:37 +09:00
committed by Gerrit Code Review

View File

@@ -843,6 +843,11 @@ int acc_ctrlrequest(struct usb_composite_dev *cdev,
w_value, w_index, w_length);
*/
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
if (!dev)
goto err;
#endif
if (b_requestType == (USB_DIR_OUT | USB_TYPE_VENDOR)) {
if (b_request == ACCESSORY_START) {
dev->start_requested = 1;