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

Commit befff4fb authored by Takashi Iwai's avatar Takashi Iwai Committed by Mark Brown
Browse files

ASoC: davinci: Kill BUG_ON() usage



Don't use BUG_ON() for a non-critical sanity check on production
systems.  This patch replaces with a softer WARN_ON() and an error
path.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1b8b68b0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1721,7 +1721,8 @@ static int davinci_mcasp_get_dma_type(struct davinci_mcasp *mcasp)
				PTR_ERR(chan));
		return PTR_ERR(chan);
	}
	BUG_ON(!chan->device || !chan->device->dev);
	if (WARN_ON(!chan->device || !chan->device->dev))
		return -EINVAL;

	if (chan->device->dev->of_node)
		ret = of_property_read_string(chan->device->dev->of_node,