diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-04-18 16:29:37 +0200 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2018-05-07 16:19:11 +0200 |
commit | 4a9fbfcab19d3f71ad2bf0bcb653c4ee84e69c7f (patch) | |
tree | 7e41a139217faba0767b3c8051c44aebdbdc851d /drivers/gpu/drm/omapdrm | |
parent | drm/vc4: Fix oops dereferencing DPI's connector since panel_bridge. (diff) | |
download | linux-4a9fbfcab19d3f71ad2bf0bcb653c4ee84e69c7f.tar.xz linux-4a9fbfcab19d3f71ad2bf0bcb653c4ee84e69c7f.zip |
drm/omap: silence unititialized variable warning
Smatch complains that "area_free" could be used without being
initialized. This code is several years old and premusably works fine
so this can't be a very serious bug. But it's easy enough to silence
the warning. If "area_free" is false at the end of the function then
we return -ENOMEM.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180418142937.GA13828@mwanda
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/omapdrm')
-rw-r--r-- | drivers/gpu/drm/omapdrm/tcm-sita.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/omapdrm/tcm-sita.c b/drivers/gpu/drm/omapdrm/tcm-sita.c index d7f7bc9f061a..817be3c41863 100644 --- a/drivers/gpu/drm/omapdrm/tcm-sita.c +++ b/drivers/gpu/drm/omapdrm/tcm-sita.c @@ -90,7 +90,7 @@ static int l2r_t2b(u16 w, u16 h, u16 a, s16 offset, { int i; unsigned long index; - bool area_free; + bool area_free = false; unsigned long slots_per_band = PAGE_SIZE / slot_bytes; unsigned long bit_offset = (offset > 0) ? offset / slot_bytes : 0; unsigned long curr_bit = bit_offset; |