Message ID | 1464516269-6504-1-git-send-email-geert@linux-m68k.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/media/usb/dvb-usb/dvb-usb-dvb.c b/drivers/media/usb/dvb-usb/dvb-usb-dvb.c index 6477b04e95c748cc..2ecc7009588a25a2 100644 --- a/drivers/media/usb/dvb-usb/dvb-usb-dvb.c +++ b/drivers/media/usb/dvb-usb/dvb-usb-dvb.c @@ -271,7 +271,7 @@ static int dvb_usb_fe_sleep(struct dvb_frontend *fe) int dvb_usb_adapter_frontend_init(struct dvb_usb_adapter *adap) { - int ret, i; + int ret = -ENODEV, i; /* register all given adapter frontends */ for (i = 0; i < adap->props.num_frontends; i++) {
drivers/media/usb/dvb-usb/dvb-usb-dvb.c: In function ‘dvb_usb_adapter_frontend_init’: drivers/media/usb/dvb-usb/dvb-usb-dvb.c:323: warning: ‘ret’ is used uninitialized in this function If num_frontends is zero, dvb_usb_adapter_frontend_init() will return an uninitialized value. Initialize ret to -ENODEV to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- Can num_frontends ever be zero? drivers/media/usb/dvb-usb/dvb-usb-dvb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)