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@xxxxxxxxxxxxxx> --- Can num_frontends ever be zero? drivers/media/usb/dvb-usb/dvb-usb-dvb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++) { -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html