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

Commit 19159a9a authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: f_gsi: Fix NULL pointer dereference"

parents cc2586a6 334cbcd7
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1806,11 +1806,16 @@ static int gsi_ctrl_send_notification(struct f_gsi *gsi)
	__le32 *data;
	struct usb_cdc_notification *event;
	struct usb_request *req = gsi->c_port.notify_req;
	struct usb_composite_dev *cdev = gsi->function.config->cdev;
	struct usb_composite_dev *cdev;
	struct gsi_ctrl_pkt *cpkt;
	unsigned long flags;
	bool del_free_cpkt = false;

	if (!gsi->function.config)
		return -ENODEV;

	cdev = gsi->function.config->cdev;

	if (!atomic_read(&gsi->connected)) {
		log_event_dbg("%s: cable disconnect", __func__);
		return -ENODEV;