mirror of
https://github.com/torvalds/linux.git
synced 2025-04-09 14:45:27 +00:00
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: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
parent
2e1796fd49
commit
c62b089163
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user