Skip to content

Commit

Permalink
Merge tag 'auxdisplay-for-linus-v5.16' of git://github.com/ojeda/linux
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Linus Torvalds committed Dec 28, 2021
2 parents f651faa + 4daa9ff commit ecf71de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/auxdisplay/charlcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ecf71de

Please sign in to comment.