From: Rickard Strandqvist Date: Sun, 1 Jun 2014 12:29:19 +0000 (-0300) Subject: [media] media: usb: dvb-usb-v2: mxl111sf.c: Cleaning up uninitialized variables X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e5a89998d4c43cd36397e1d9e061bfdab0bcd094;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [media] media: usb: dvb-usb-v2: mxl111sf.c: Cleaning up uninitialized variables 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf.c b/drivers/media/usb/dvb-usb-v2/mxl111sf.c index c7304fa8ab73..b8a707e57b99 100644 --- a/drivers/media/usb/dvb-usb-v2/mxl111sf.c +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf.c @@ -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);