Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
59353d70 935ae6f8

+3 -1
+3 -1
drivers/media/firewire/firedtv-avc.c
··· 597 597 case FIREDTV_DVB_C: pos = avc_tuner_dsd_dvb_c(fdtv, p); break; 598 598 case FIREDTV_DVB_T: pos = avc_tuner_dsd_dvb_t(fdtv, p); break; 599 599 default: 600 - BUG(); 600 + ret = -EIO; 601 + goto unlock; 601 602 } 602 603 pad_operands(c, pos); 603 604 ··· 613 612 if (status) 614 613 *status = r->operand[2]; 615 614 #endif 615 + unlock: 616 616 mutex_unlock(&fdtv->avc_mutex); 617 617 618 618 if (ret == 0)