summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends
diff options
context:
space:
mode:
authorNicolas Iooss <nicolas.iooss_linux@m4x.org>2016-09-10 19:49:01 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-10-24 22:16:56 +0300
commit19157003abe4d9ca4706fca8ff8306946f7942c6 (patch)
tree925dcc80a016009fa1207a63814f354d56c2dcef /drivers/media/dvb-frontends
parent82b65714a6f5f5124d7cc5a2162272a8576df80f (diff)
downloadlinux-19157003abe4d9ca4706fca8ff8306946f7942c6.tar.xz
[media] mb86a20s: always initialize a return value
In mb86a20s_read_status_and_stats(), when mb86a20s_read_status() fails, the function returns the value in variable rc without initializing it first. Fix this by propagating the error code from variable status_nr. This bug has been found using clang and -Wsometimes-uninitialized warning flag. Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/dvb-frontends')
-rw-r--r--drivers/media/dvb-frontends/mb86a20s.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/dvb-frontends/mb86a20s.c b/drivers/media/dvb-frontends/mb86a20s.c
index fe79358b035e..27f425137ce6 100644
--- a/drivers/media/dvb-frontends/mb86a20s.c
+++ b/drivers/media/dvb-frontends/mb86a20s.c
@@ -1967,6 +1967,7 @@ static int mb86a20s_read_status_and_stats(struct dvb_frontend *fe,
if (status_nr < 0) {
dev_err(&state->i2c->dev,
"%s: Can't read frontend lock status\n", __func__);
+ rc = status_nr;
goto error;
}