A couple improvements for auxdisplay:

- charlcd: checking for pointer reference before dereferencing.
 
   - charlcd: fixing coding style issue.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPjU5OPd5QIZ9jqqOGXyLc2htIW0FAmHLLwMACgkQGXyLc2ht
 IW1aFA/+PqbolftHHUCq8fmfWnwWdyaBnyrmiLCxkxovPYAgR4GL/XuVh08wF9jL
 jjpUyGOnU3Dojp7btuQe0ybvdk4UvqTrtyWduN4p7xt5BMA/aiBBUoUSpCVt+j4O
 CTVsf4pMbm+6BuKoB8R7Ve1eblNCuJYgwa3s9rqvSb7wuEqS/sCxJpbevKGh2MiY
 DmFY6rK/CAVql+tVck/T1xoqwZPOLJuxSxIl2xOc4dQcBJT5tlL4yKmywUI8jtIX
 nHa9WrAOSL4GrTDytCoDiPqQ0DZS+WOFBjXMI36jCBI5cJy23w1U+3ksWQhpH9Jm
 /hfDeHJQaoWtnxjd+/iFCcExkpHiT6nlEgS3SfVQrvyrJzHgKnL+LcjQjGDs8TuD
 NcnHQOE/qZ6sPjVvHoYUWLGISGE4dtVKytNuNzCLdQwNZ/KwPLfGTv6sz08gCH/o
 Wz9MRghCCNHLrJWuraBRgEFO9AVGUYFRY7g/7yD7FwEu0ji5EaFckwvrPFqb1ALL
 pW/HSP+kQNtzAl/4JaXmPEzEoS+F0nzoL2s6MZdO71/py42oWGDENuOoBAywO8ZC
 XfmP/zq9331AO0NbWiRNnubbJUXU+/zmsTydV4exxElsZWaU6aLl8HFgZuEfypIw
 S3XyrtNmUH0JYnD30bz+8g7GGsXLIQpd+GrOUifDSecf9XuCKdc=
 =Bz/T
 -----END PGP SIGNATURE-----

Merge tag 'auxdisplay-for-linus-v5.16' of git://github.com/ojeda/linux

Pull auxdisplay fixes from Miguel Ojeda:
 "A couple of improvements for charlcd:

   - check pointer before dereferencing

   - fix coding style issue"

* tag 'auxdisplay-for-linus-v5.16' of git://github.com/ojeda/linux:
  auxdisplay: charlcd: checking for pointer reference before dereferencing
  auxdisplay: charlcd: fixing coding style issue
This commit is contained in:
Linus Torvalds 2021-12-28 11:46:15 -08:00
commit ecf71de775

View File

@ -37,7 +37,7 @@ struct charlcd_priv {
bool must_clear;
/* contains the LCD config state */
unsigned long int flags;
unsigned long flags;
/* Current escape sequence and it's length or -1 if outside */
struct {
@ -578,6 +578,9 @@ static int charlcd_init(struct charlcd *lcd)
* Since charlcd_init_display() needs to write data, we have to
* enable mark the LCD initialized just before.
*/
if (WARN_ON(!lcd->ops->init_display))
return -EINVAL;
ret = lcd->ops->init_display(lcd);
if (ret)
return ret;