summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci
diff options
context:
space:
mode:
authorAtharv Dubey <atharvd440@gmail.com>2026-03-14 02:02:22 +0530
committerHans Verkuil <hverkuil+cisco@kernel.org>2026-03-16 11:51:55 +0100
commitf48753aa3a109051e63e050e796f7d4cc6f22d3c (patch)
tree83c91c0247a880a313c334cd29455ec4a14d93c5 /drivers/media/pci
parentc03222d061fc5d150d696e7c3a91e58a620c7e65 (diff)
downloadlinux-f48753aa3a109051e63e050e796f7d4cc6f22d3c.tar.gz
linux-f48753aa3a109051e63e050e796f7d4cc6f22d3c.zip
media: cx25821-alsa: replace BUG_ON() with WARN_ON()
media: cx25821-alsa: replace BUG_ON() with WARN_ON() Avoid crashing the kernel for a recoverable condition by replacing BUG_ON() with WARN_ON(). Signed-off-by: Atharv Dubey <atharvd440@gmail.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r--drivers/media/pci/cx25821/cx25821-alsa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/pci/cx25821/cx25821-alsa.c b/drivers/media/pci/cx25821/cx25821-alsa.c
index 3f73391f9098..4fdc59aaed8e 100644
--- a/drivers/media/pci/cx25821/cx25821-alsa.c
+++ b/drivers/media/pci/cx25821/cx25821-alsa.c
@@ -397,7 +397,7 @@ static int dsp_buffer_free(struct cx25821_audio_dev *chip)
{
struct cx25821_riscmem *risc = &chip->buf->risc;
- BUG_ON(!chip->dma_size);
+ WARN_ON(!chip->dma_size);
dprintk(2, "Freeing buffer\n");
cx25821_alsa_dma_unmap(chip);
@@ -509,8 +509,8 @@ static int snd_cx25821_hw_params(struct snd_pcm_substream *substream,
chip->num_periods = params_periods(hw_params);
chip->dma_size = chip->period_size * params_periods(hw_params);
- BUG_ON(!chip->dma_size);
- BUG_ON(chip->num_periods & (chip->num_periods - 1));
+ WARN_ON(!chip->dma_size);
+ WARN_ON(chip->num_periods & (chip->num_periods - 1));
buf = kzalloc_obj(*buf);
if (NULL == buf)