Commit c62b0891 authored by Hans Verkuil's avatar Hans Verkuil

media: pci: saa7164: replace BUG with error return

It was completely unnecessary to use BUG in saa7164_s_frequency,
just return an error instead. This also solves a smatch error:

drivers/media/pci/saa7164/saa7164-encoder.c:388 saa7164_s_frequency() error: potentially dereferencing uninitialized 'tsport'.
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 2e1796fd
......@@ -383,7 +383,7 @@ int saa7164_s_frequency(struct saa7164_port *port,
else if (port->nr == SAA7164_PORT_ENC2)
tsport = &dev->ports[SAA7164_PORT_TS2];
else
BUG();
return -EINVAL; /* should not happen */
fe = tsport->dvb.frontend;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment