[media] media: usb: dvb-usb-v2: mxl111sf.c: Cleaning up uninitialized variables
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Sun, 1 Jun 2014 12:29:19 +0000 (09:29 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 4 Jul 2014 18:43:34 +0000 (15:43 -0300)
There is a risk that the variable will be used without being initialized.

This was largely found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/dvb-usb-v2/mxl111sf.c

index c7304fa8ab737e46257545d0e30316de2c8cd539..b8a707e57b994c6d7863941402d91350b990ea0e 100644 (file)
@@ -129,7 +129,7 @@ int mxl111sf_write_reg_mask(struct mxl111sf_state *state,
                                   u8 addr, u8 mask, u8 data)
 {
        int ret;
-       u8 val;
+       u8 val = 0;
 
        if (mask != 0xff) {
                ret = mxl111sf_read_reg(state, addr, &val);