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

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

Merge "ASoC: soundwire: add null check before dereference"

parents 6d414570 0e8b95d2
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -53,9 +53,12 @@ static struct swr_master *swr_master_get(struct swr_master *master)
static void swr_dev_release(struct device *dev)
{
	struct swr_device *swr_dev = to_swr_device(dev);
	struct swr_master *master = swr_dev->master;
	struct swr_master *master;

	if (!swr_dev || !master)
	if (!swr_dev)
		return;
	master = swr_dev->master;
	if (!master)
		return;
	mutex_lock(&master->mlock);
	list_del_init(&swr_dev->dev_list);