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

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

Merge "USB: u_bam_data: Check for port_usb after fifo allocation"

parents 12a91e18 1f11d4c0
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -590,7 +590,7 @@ static void bam_data_start_endless_rx(struct bam_data_port *port)
	int status;

	spin_lock_irqsave(&port->port_lock, flags);
	if (!port->port_usb) {
	if (!port->port_usb || !d->rx_req) {
		spin_unlock_irqrestore(&port->port_lock, flags);
		return;
	}
@@ -611,7 +611,7 @@ static void bam_data_start_endless_tx(struct bam_data_port *port)
	int status;

	spin_lock_irqsave(&port->port_lock, flags);
	if (!port->port_usb) {
	if (!port->port_usb || !d->tx_req) {
		spin_unlock_irqrestore(&port->port_lock, flags);
		return;
	}
@@ -922,6 +922,12 @@ static void bam2bam_data_connect_work(struct work_struct *w)
	usb_bam_alloc_fifos(d->usb_bam_type, d->dst_connection_idx);

	spin_lock_irqsave(&port->port_lock, flags);
	if (!port->port_usb) {
		pr_err("Disconnected.port_usb is NULL\n");
		spin_unlock_irqrestore(&port->port_lock, flags);
		goto free_fifos;
	}

	if (gadget_is_dwc3(gadget)) {
		/* Configure RX */
		configure_usb_data_fifo(d->usb_bam_type,