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

Commit b33ffa5c authored by Tilman Schmidt's avatar Tilman Schmidt Committed by David S. Miller
Browse files

isdn/gigaset: bas_gigaset locking fix



Unlock cs->lock before calling error_hangup() which is marked
"cs->lock must not be held".

Signed-off-by: default avatarTilman Schmidt <tilman@imap.cc>
CC: stable <stable@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c7ebfdac
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -1598,13 +1598,13 @@ static int gigaset_init_bchannel(struct bc_state *bcs)


	ret = starturbs(bcs);
	ret = starturbs(bcs);
	if (ret < 0) {
	if (ret < 0) {
		spin_unlock_irqrestore(&cs->lock, flags);
		dev_err(cs->dev,
		dev_err(cs->dev,
			"could not start isochronous I/O for channel B%d: %s\n",
			"could not start isochronous I/O for channel B%d: %s\n",
			bcs->channel + 1,
			bcs->channel + 1,
			ret == -EFAULT ? "null URB" : get_usb_rcmsg(ret));
			ret == -EFAULT ? "null URB" : get_usb_rcmsg(ret));
		if (ret != -ENODEV)
		if (ret != -ENODEV)
			error_hangup(bcs);
			error_hangup(bcs);
		spin_unlock_irqrestore(&cs->lock, flags);
		return ret;
		return ret;
	}
	}


@@ -1614,11 +1614,11 @@ static int gigaset_init_bchannel(struct bc_state *bcs)
		dev_err(cs->dev, "could not open channel B%d\n",
		dev_err(cs->dev, "could not open channel B%d\n",
			bcs->channel + 1);
			bcs->channel + 1);
		stopurbs(bcs->hw.bas);
		stopurbs(bcs->hw.bas);
		if (ret != -ENODEV)
			error_hangup(bcs);
	}
	}


	spin_unlock_irqrestore(&cs->lock, flags);
	spin_unlock_irqrestore(&cs->lock, flags);
	if (ret < 0 && ret != -ENODEV)
		error_hangup(bcs);
	return ret;
	return ret;
}
}