Commit ecf71de7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents f651faaa 4daa9ff8
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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;