Commit 2064d778 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'auxdisplay-v7.0-1' of...

Merge tag 'auxdisplay-v7.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-auxdisplay

Pull auxdisplay fixes from Andy Shevchenko:

 - Fix NULL dereference in linedisp_release()

 - Fix ht16k33 DT bindings to avoid warnings

 - Handle errors in I²C transfers in lcd2s driver

* tag 'auxdisplay-v7.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-auxdisplay:
  auxdisplay: line-display: fix NULL dereference in linedisp_release
  auxdisplay: lcd2s: add error handling for i2c transfers
  dt-bindings: auxdisplay: ht16k33: Use unevaluatedProperties to fix common property warning
parents 9147566d 7f138de1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ then:
  required:
    - refresh-rate-hz

additionalProperties: false
unevaluatedProperties: false

examples:
  - |
+12 −3
Original line number Diff line number Diff line
@@ -99,8 +99,13 @@ static int lcd2s_print(struct charlcd *lcd, int c)
{
	struct lcd2s_data *lcd2s = lcd->drvdata;
	u8 buf[2] = { LCD2S_CMD_WRITE, c };
	int ret;

	lcd2s_i2c_master_send(lcd2s->i2c, buf, sizeof(buf));
	ret = lcd2s_i2c_master_send(lcd2s->i2c, buf, sizeof(buf));
	if (ret < 0)
		return ret;
	if (ret != sizeof(buf))
		return -EIO;
	return 0;
}

@@ -108,9 +113,13 @@ static int lcd2s_gotoxy(struct charlcd *lcd, unsigned int x, unsigned int y)
{
	struct lcd2s_data *lcd2s = lcd->drvdata;
	u8 buf[3] = { LCD2S_CMD_CUR_POS, y + 1, x + 1 };
	int ret;

	lcd2s_i2c_master_send(lcd2s->i2c, buf, sizeof(buf));

	ret = lcd2s_i2c_master_send(lcd2s->i2c, buf, sizeof(buf));
	if (ret < 0)
		return ret;
	if (ret != sizeof(buf))
		return -EIO;
	return 0;
}

+1 −1
Original line number Diff line number Diff line
@@ -365,7 +365,7 @@ static DEFINE_IDA(linedisp_id);

static void linedisp_release(struct device *dev)
{
	struct linedisp *linedisp = to_linedisp(dev);
	struct linedisp *linedisp = container_of(dev, struct linedisp, dev);

	kfree(linedisp->map);
	kfree(linedisp->message);