OSDN Git Service

media: Bulk remove BUG_ON(in_interrupt())
authorThomas Gleixner <tglx@linutronix.de>
Tue, 13 Oct 2020 14:26:17 +0000 (16:26 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 16 Nov 2020 09:31:10 +0000 (10:31 +0100)
commit9bb83e8fe252f15ad30430e80eb7f9da66cacbb9
treeca1f95dbced804e4a86cd4cb5bfb8891b7d82e0d
parentd940d2f46bfec6e206609cf44c6bd612a81d117e
media: Bulk remove BUG_ON(in_interrupt())

None of these BUG_ON()'s is justified. BUG_ON() should only be used when
there is really no way to survive.

If at all these could be replaced by lockdep_assert_preemption_enabled() to
cover all invalid caller context and not just those covered by
in_interrupt().

But all functions which are invoked from those places contain already debug
mechanisms to catch wrong context, so having these extra checks is not
having any advantage.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/common/saa7146/saa7146_fops.c
drivers/media/pci/bt8xx/bttv-risc.c
drivers/media/pci/cx23885/cx23885-core.c
drivers/media/pci/cx25821/cx25821-core.c
drivers/media/platform/fsl-viu.c
drivers/media/usb/tm6000/tm6000-video.c
drivers/media/usb/zr364xx/zr364xx.c