* [PATCH] media: usb: dvb-usb-v2: mxl111sf.c: Cleaning up uninitialized variables
@ 2014-06-01 12:29 Rickard Strandqvist
0 siblings, 0 replies; only message in thread
From: Rickard Strandqvist @ 2014-06-01 12:29 UTC (permalink / raw)
To: Michael Krufky, Mauro Carvalho Chehab
Cc: Rickard Strandqvist, linux-media, linux-kernel
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>
---
drivers/media/usb/dvb-usb-v2/mxl111sf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf.c b/drivers/media/usb/dvb-usb-v2/mxl111sf.c
index c7304fa..b8a707e 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);
--
1.7.10.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-06-01 12:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-01 12:29 [PATCH] media: usb: dvb-usb-v2: mxl111sf.c: Cleaning up uninitialized variables Rickard Strandqvist
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).