Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9281627 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull char/misc driver fixes from Greg KH:
 "Here are some small char/misc driver fixes for 4.10-rc4 that resolve
  some reported issues.

  The MEI driver issue resolves a lot of problems that people have been
  having, as does the mem driver fix. The other minor fixes resolve
  other reported issues.

  All of these have been in linux-next for a while"

* tag 'char-misc-4.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  vme: Fix wrong pointer utilization in ca91cx42_slave_get
  auxdisplay: fix new ht16k33 build errors
  ppdev: don't print a free'd string
  extcon: return error code on failure
  drivers: char: mem: Fix thinkos in kmem address checks
  mei: bus: enable OS version only for SPT and newer
parents 2d5a7101 c8a6a09c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -132,9 +132,9 @@ config HT16K33
	tristate "Holtek Ht16K33 LED controller with keyscan"
	depends on FB && OF && I2C && INPUT
	select FB_SYS_FOPS
	select FB_CFB_FILLRECT
	select FB_CFB_COPYAREA
	select FB_CFB_IMAGEBLIT
	select FB_SYS_FILLRECT
	select FB_SYS_COPYAREA
	select FB_SYS_IMAGEBLIT
	select INPUT_MATRIXKMAP
	select FB_BACKLIGHT
	help
+4 −6
Original line number Diff line number Diff line
@@ -381,9 +381,6 @@ static ssize_t read_kmem(struct file *file, char __user *buf,
	char *kbuf; /* k-addr because vread() takes vmlist_lock rwlock */
	int err = 0;

	if (!pfn_valid(PFN_DOWN(p)))
		return -EIO;

	read = 0;
	if (p < (unsigned long) high_memory) {
		low_count = count;
@@ -412,6 +409,8 @@ static ssize_t read_kmem(struct file *file, char __user *buf,
			 * by the kernel or data corruption may occur
			 */
			kbuf = xlate_dev_kmem_ptr((void *)p);
			if (!virt_addr_valid(kbuf))
				return -ENXIO;

			if (copy_to_user(buf, kbuf, sz))
				return -EFAULT;
@@ -482,6 +481,8 @@ static ssize_t do_write_kmem(unsigned long p, const char __user *buf,
		 * corruption may occur.
		 */
		ptr = xlate_dev_kmem_ptr((void *)p);
		if (!virt_addr_valid(ptr))
			return -ENXIO;

		copied = copy_from_user(ptr, buf, sz);
		if (copied) {
@@ -512,9 +513,6 @@ static ssize_t write_kmem(struct file *file, const char __user *buf,
	char *kbuf; /* k-addr because vwrite() takes vmlist_lock rwlock */
	int err = 0;

	if (!pfn_valid(PFN_DOWN(p)))
		return -EIO;

	if (p < (unsigned long) high_memory) {
		unsigned long to_write = min_t(unsigned long, count,
					       (unsigned long)high_memory - p);
+8 −5
Original line number Diff line number Diff line
@@ -290,6 +290,7 @@ static int register_device(int minor, struct pp_struct *pp)
	struct pardevice *pdev = NULL;
	char *name;
	struct pardev_cb ppdev_cb;
	int rc = 0;

	name = kasprintf(GFP_KERNEL, CHRDEV "%x", minor);
	if (name == NULL)
@@ -298,8 +299,8 @@ static int register_device(int minor, struct pp_struct *pp)
	port = parport_find_number(minor);
	if (!port) {
		pr_warn("%s: no associated port!\n", name);
		kfree(name);
		return -ENXIO;
		rc = -ENXIO;
		goto err;
	}

	memset(&ppdev_cb, 0, sizeof(ppdev_cb));
@@ -308,16 +309,18 @@ static int register_device(int minor, struct pp_struct *pp)
	ppdev_cb.private = pp;
	pdev = parport_register_dev_model(port, name, &ppdev_cb, minor);
	parport_put_port(port);
	kfree(name);

	if (!pdev) {
		pr_warn("%s: failed to register device!\n", name);
		return -ENXIO;
		rc = -ENXIO;
		goto err;
	}

	pp->pdev = pdev;
	dev_dbg(&pdev->dev, "registered pardevice\n");
	return 0;
err:
	kfree(name);
	return rc;
}

static enum ieee1284_phase init_phase(int mode)
+1 −1
Original line number Diff line number Diff line
@@ -453,7 +453,7 @@ int extcon_sync(struct extcon_dev *edev, unsigned int id)
		dev_err(&edev->dev, "out of memory in extcon_set_state\n");
		kobject_uevent(&edev->dev.kobj, KOBJ_CHANGE);

		return 0;
		return -ENOMEM;
	}

	length = name_show(&edev->dev, NULL, prop_buf);
+3 −0
Original line number Diff line number Diff line
@@ -152,6 +152,9 @@ static void mei_mkhi_fix(struct mei_cl_device *cldev)
{
	int ret;

	if (!cldev->bus->hbm_f_os_supported)
		return;

	ret = mei_cldev_enable(cldev);
	if (ret)
		return;
Loading