summaryrefslogtreecommitdiffstats
path: root/drivers/media/firewire
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2023-08-04 12:59:41 +0200
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-08-10 07:58:37 +0200
commit59353d7051d67ffe8bb6da6152074961eeb3eb6e (patch)
tree9c1a63a8d80b2408bac89dee044fcda75f56155d /drivers/media/firewire
parent935ae6f8ba00aacb8ab176b990d79acdcf71d16a (diff)
downloadlinux-59353d7051d67ffe8bb6da6152074961eeb3eb6e.tar.gz
linux-59353d7051d67ffe8bb6da6152074961eeb3eb6e.tar.bz2
linux-59353d7051d67ffe8bb6da6152074961eeb3eb6e.zip
media: firewire: firedtv-avc.c: replace BUG with proper, error return
This resolves this smatch error: drivers/media/firewire/firedtv-avc.c:602 avc_tuner_dsd() error: uninitialized symbol 'pos'. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/firewire')
-rw-r--r--drivers/media/firewire/firedtv-avc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/firewire/firedtv-avc.c b/drivers/media/firewire/firedtv-avc.c
index 71991f8638e6..a36c28412170 100644
--- a/drivers/media/firewire/firedtv-avc.c
+++ b/drivers/media/firewire/firedtv-avc.c
@@ -597,7 +597,8 @@ int avc_tuner_dsd(struct firedtv *fdtv,
case FIREDTV_DVB_C: pos = avc_tuner_dsd_dvb_c(fdtv, p); break;
case FIREDTV_DVB_T: pos = avc_tuner_dsd_dvb_t(fdtv, p); break;
default:
- BUG();
+ ret = -EIO;
+ goto unlock;
}
pad_operands(c, pos);
@@ -612,6 +613,7 @@ int avc_tuner_dsd(struct firedtv *fdtv,
if (status)
*status = r->operand[2];
#endif
+unlock:
mutex_unlock(&fdtv->avc_mutex);
if (ret == 0)