diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-07-21 11:24:01 +0300 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-07-25 10:24:31 +0300 |
commit | c62b089163ce89c7c0c471854ca01763c13813dd (patch) | |
tree | aece759ad6ec3941936540c44d7cbddabfbfb608 /drivers/media/pci | |
parent | 2e1796fd4904fdd6062a8e4589778ea899ea0c8d (diff) | |
download | linux-c62b089163ce89c7c0c471854ca01763c13813dd.tar.xz |
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>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r-- | drivers/media/pci/saa7164/saa7164-encoder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/pci/saa7164/saa7164-encoder.c b/drivers/media/pci/saa7164/saa7164-encoder.c index c1b6a0596801..bf73e9e83f52 100644 --- a/drivers/media/pci/saa7164/saa7164-encoder.c +++ b/drivers/media/pci/saa7164/saa7164-encoder.c @@ -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; |