summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoralf Trønnes <noralf@tronnes.org>2017-02-23 14:29:55 +0100
committerDave Airlie <airlied@redhat.com>2017-02-24 03:08:58 +0100
commitb401f34314db7c60e6d23ee7771cd090b4ef56c1 (patch)
tree74866bca0c2b4c2d4e2b07c3cdd997f9bf621fa9
parentMerge branch 'drm-next-4.11' of git://people.freedesktop.org/~agd5f/linux int... (diff)
downloadlinux-b401f34314db7c60e6d23ee7771cd090b4ef56c1.tar.xz
linux-b401f34314db7c60e6d23ee7771cd090b4ef56c1.zip
drm/tinydrm: mipi-dbi: Silence: ‘cmd’ may be used uninitialized
Fix this warning: drivers/gpu/drm/tinydrm/mipi-dbi.c: In function ‘mipi_dbi_debugfs_command_write’: drivers/gpu/drm/tinydrm/mipi-dbi.c:905:8: warning: ‘cmd’ may be used uninitialized in this function [-Wmaybe-uninitialized] ret = mipi_dbi_command_buf(mipi, cmd, parameters, i); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cmd can't be used uninitialized, but to satisfy the compiler, initialize it to zero. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/tinydrm/mipi-dbi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tinydrm/mipi-dbi.c b/drivers/gpu/drm/tinydrm/mipi-dbi.c
index 07d49ba78d8e..2caecdea7ab3 100644
--- a/drivers/gpu/drm/tinydrm/mipi-dbi.c
+++ b/drivers/gpu/drm/tinydrm/mipi-dbi.c
@@ -863,7 +863,7 @@ static ssize_t mipi_dbi_debugfs_command_write(struct file *file,
{
struct seq_file *m = file->private_data;
struct mipi_dbi *mipi = m->private;
- u8 val, cmd, parameters[64];
+ u8 val, cmd = 0, parameters[64];
char *buf, *pos, *token;
unsigned int i;
int ret;