Browse Source

[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 <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Rickard Strandqvist 11 years ago
parent
commit
e5a89998d4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/media/usb/dvb-usb-v2/mxl111sf.c

+ 1 - 1
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);