diff options
author | Tom Rix <trix@redhat.com> | 2020-07-12 08:24:53 -0700 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2020-07-13 17:57:17 +0200 |
commit | 02cd2d3144653e6e2a0c7ccaa73311e48e2dc686 (patch) | |
tree | 94ac6d1c61a78a48705bcde8fd7b99f5d590e7e9 /drivers | |
parent | 1e691e2444871d1fde11b611653b5da9010dcec8 (diff) |
drm/bridge: sil_sii8620: initialize return of sii8620_readb
clang static analysis flags this error
sil-sii8620.c:184:2: warning: Undefined or garbage value
returned to caller [core.uninitialized.UndefReturn]
return ret;
^~~~~~~~~~
sii8620_readb calls sii8620_read_buf.
sii8620_read_buf can return without setting its output
pararmeter 'ret'.
So initialize ret.
Fixes: ce6e153f414a ("drm/bridge: add Silicon Image SiI8620 driver")
Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200712152453.27510-1-trix@redhat.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/bridge/sil-sii8620.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/bridge/sil-sii8620.c b/drivers/gpu/drm/bridge/sil-sii8620.c index 7c0c93c7e61f..95f3d8cfe9ec 100644 --- a/drivers/gpu/drm/bridge/sil-sii8620.c +++ b/drivers/gpu/drm/bridge/sil-sii8620.c @@ -178,7 +178,7 @@ static void sii8620_read_buf(struct sii8620 *ctx, u16 addr, u8 *buf, int len) static u8 sii8620_readb(struct sii8620 *ctx, u16 addr) { - u8 ret; + u8 ret = 0; sii8620_read_buf(ctx, addr, &ret, 1); return ret; |