Commit b401f343 authored by Noralf Trønnes's avatar Noralf Trønnes Committed by Dave Airlie

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: default avatarNoralf Trønnes <noralf@tronnes.org>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 1e8ad3d8
...@@ -863,7 +863,7 @@ static ssize_t mipi_dbi_debugfs_command_write(struct file *file, ...@@ -863,7 +863,7 @@ static ssize_t mipi_dbi_debugfs_command_write(struct file *file,
{ {
struct seq_file *m = file->private_data; struct seq_file *m = file->private_data;
struct mipi_dbi *mipi = m->private; struct mipi_dbi *mipi = m->private;
u8 val, cmd, parameters[64]; u8 val, cmd = 0, parameters[64];
char *buf, *pos, *token; char *buf, *pos, *token;
unsigned int i; unsigned int i;
int ret; int ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment