Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f857b317 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "USB: f_accessory: Check dev pointer before decoding ctrl request"

parents fc85727d 9ca78a40
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -878,6 +878,12 @@ int acc_ctrlrequest(struct usb_composite_dev *cdev,
	u16	w_length = le16_to_cpu(ctrl->wLength);
	unsigned long flags;

	/*
	 * If instance is not created which is the case in power off charging
	 * mode, dev will be NULL. Hence return error if it is the case.
	 */
	if (!dev)
		return -ENODEV;
/*
	printk(KERN_INFO "acc_ctrlrequest "
			"%02x.%02x v%04x i%04x l%u\n",