]> git.baikalelectronics.ru Git - kernel.git/commit
auxdisplay: img-ascii-lcd: Silence 2 uninitialized warnings
authorMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Mon, 19 Feb 2018 15:47:52 +0000 (16:47 +0100)
committerMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Tue, 13 Mar 2018 17:16:38 +0000 (18:16 +0100)
commit8aed5bd6f697be50ddba65d2e83b6bb08bb1ab00
tree8211aa3c62a6bf9d6f9f85626607d2c7978cd563
parentf6bda683431b06b2905eb55d2634fe06969c3592
auxdisplay: img-ascii-lcd: Silence 2 uninitialized warnings

The warnings are:

  drivers/auxdisplay/img-ascii-lcd.c: warning: 'err' may be used
  uninitialized in this function [-Wuninitialized]

At lines 109 and 207. Reported by Geert using the build service
several times, e.g.:

  https://lkml.org/lkml/2018/2/19/303

They are two false positives, since num_chars > 0 in the three present
configurations (boston, malta, sead3). Initialize to 0 in order to
silence the warning.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Paul Burton <paul.burton@mips.com>
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
drivers/auxdisplay/img-ascii-lcd.c