[media] dvb-usb: silence an uninitialized variable warning
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 27 Jun 2016 14:29:46 +0000 (11:29 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 13 Jul 2016 16:13:22 +0000 (13:13 -0300)
My static checker complains that if adap->props.num_frontends is 0 then
"ret" is uninitialized.  I don't think that can happen.  But "ret" is
always zero here so we can just remove the condition.

This extra check was added in commit 0d3ab8410dcb ('[media] dvb core:
must check dvb_create_media_graph()').

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/dvb-usb/dvb-usb-dvb.c

index 6477b04e95c748cc1a538049950d7d79c45d5dd7..a04c0a25062579c310c837c0ba83ff3f60e9d94c 100644 (file)
@@ -320,8 +320,6 @@ int dvb_usb_adapter_frontend_init(struct dvb_usb_adapter *adap)
 
                adap->num_frontends_initialized++;
        }
-       if (ret)
-               return ret;
 
        ret = dvb_create_media_graph(&adap->dvb_adap, true);
        if (ret)