]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
media: tc358743: initialize variable
authorTom Rix <trix@redhat.com>
Sun, 30 Aug 2020 16:30:43 +0000 (18:30 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 9 Nov 2020 13:48:40 +0000 (14:48 +0100)
BugLink: https://bugs.launchpad.net/bugs/1902115
[ Upstream commit 274cf92d5dff5c2fec1a518078542ffe70d07646 ]

clang static analysis flags this error

tc358743.c:1468:9: warning: Branch condition evaluates
  to a garbage value
        return handled ? IRQ_HANDLED : IRQ_NONE;
               ^~~~~~~
handled should be initialized to false.

Fixes: d747b806abf4 ("[media] tc358743: add direct interrupt handling")
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
drivers/media/i2c/tc358743.c

index dbbab75f135ec08f8248e2c2938cbc43556daa84..211caade9f9989fb6954cca1dce1d674e94ff5b1 100644 (file)
@@ -1461,7 +1461,7 @@ static int tc358743_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
 static irqreturn_t tc358743_irq_handler(int irq, void *dev_id)
 {
        struct tc358743_state *state = dev_id;
-       bool handled;
+       bool handled = false;
 
        tc358743_isr(&state->sd, 0, &handled);