Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'char-misc-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg KH:
"Here are a small number of char and misc driver fixes for 4.7-rc4.

They resolve some minor issues that have been reported, and have all
been in linux-next"

* tag 'char-misc-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
coresight: Handle build path error
coresight: Fix erroneous memset in tmc_read_unprepare_etr
coresight: Fix tmc_read_unprepare_etr
coresight: Fix NULL pointer dereference in _coresight_build_path
extcon: palmas: Fix boot up state of VBUS when using GPIO detection
mcb: Acquire reference to carrier module in core
mcb: Acquire reference to device in probe
mei: don't use wake_up_interruptible for wr_ctrl

+32 -15
+2
drivers/extcon/extcon-palmas.c
··· 360 360 361 361 palmas_enable_irq(palmas_usb); 362 362 /* perform initial detection */ 363 + if (palmas_usb->enable_gpio_vbus_detection) 364 + palmas_vbus_irq_handler(palmas_usb->gpio_vbus_irq, palmas_usb); 363 365 palmas_gpio_id_detect(&palmas_usb->wq_detectid.work); 364 366 device_set_wakeup_capable(&pdev->dev, true); 365 367 return 0;
+4 -7
drivers/hwtracing/coresight/coresight-tmc-etr.c
··· 300 300 if (local_read(&drvdata->mode) == CS_MODE_SYSFS) { 301 301 /* 302 302 * The trace run will continue with the same allocated trace 303 - * buffer. As such zero-out the buffer so that we don't end 304 - * up with stale data. 305 - * 306 - * Since the tracer is still enabled drvdata::buf 307 - * can't be NULL. 303 + * buffer. The trace buffer is cleared in tmc_etr_enable_hw(), 304 + * so we don't have to explicitly clear it. Also, since the 305 + * tracer is still enabled drvdata::buf can't be NULL. 308 306 */ 309 - memset(drvdata->buf, 0, drvdata->size); 310 307 tmc_etr_enable_hw(drvdata); 311 308 } else { 312 309 /* ··· 312 315 */ 313 316 vaddr = drvdata->vaddr; 314 317 paddr = drvdata->paddr; 315 - drvdata->buf = NULL; 318 + drvdata->buf = drvdata->vaddr = NULL; 316 319 } 317 320 318 321 drvdata->reading = false;
+9 -6
drivers/hwtracing/coresight/coresight.c
··· 385 385 int i; 386 386 bool found = false; 387 387 struct coresight_node *node; 388 - struct coresight_connection *conn; 389 388 390 389 /* An activated sink has been found. Enqueue the element */ 391 390 if ((csdev->type == CORESIGHT_DEV_TYPE_SINK || ··· 393 394 394 395 /* Not a sink - recursively explore each port found on this element */ 395 396 for (i = 0; i < csdev->nr_outport; i++) { 396 - conn = &csdev->conns[i]; 397 - if (_coresight_build_path(conn->child_dev, path) == 0) { 397 + struct coresight_device *child_dev = csdev->conns[i].child_dev; 398 + 399 + if (child_dev && _coresight_build_path(child_dev, path) == 0) { 398 400 found = true; 399 401 break; 400 402 } ··· 425 425 struct list_head *coresight_build_path(struct coresight_device *csdev) 426 426 { 427 427 struct list_head *path; 428 + int rc; 428 429 429 430 path = kzalloc(sizeof(struct list_head), GFP_KERNEL); 430 431 if (!path) ··· 433 432 434 433 INIT_LIST_HEAD(path); 435 434 436 - if (_coresight_build_path(csdev, path)) { 435 + rc = _coresight_build_path(csdev, path); 436 + if (rc) { 437 437 kfree(path); 438 - path = NULL; 438 + return ERR_PTR(rc); 439 439 } 440 440 441 441 return path; ··· 509 507 goto out; 510 508 511 509 path = coresight_build_path(csdev); 512 - if (!path) { 510 + if (IS_ERR(path)) { 513 511 pr_err("building path(s) failed\n"); 512 + ret = PTR_ERR(path); 514 513 goto out; 515 514 } 516 515
+16 -1
drivers/mcb/mcb-core.c
··· 61 61 struct mcb_driver *mdrv = to_mcb_driver(dev->driver); 62 62 struct mcb_device *mdev = to_mcb_device(dev); 63 63 const struct mcb_device_id *found_id; 64 + struct module *carrier_mod; 65 + int ret; 64 66 65 67 found_id = mcb_match_id(mdrv->id_table, mdev); 66 68 if (!found_id) 67 69 return -ENODEV; 68 70 69 - return mdrv->probe(mdev, found_id); 71 + carrier_mod = mdev->dev.parent->driver->owner; 72 + if (!try_module_get(carrier_mod)) 73 + return -EINVAL; 74 + 75 + get_device(dev); 76 + ret = mdrv->probe(mdev, found_id); 77 + if (ret) 78 + module_put(carrier_mod); 79 + 80 + return ret; 70 81 } 71 82 72 83 static int mcb_remove(struct device *dev) 73 84 { 74 85 struct mcb_driver *mdrv = to_mcb_driver(dev->driver); 75 86 struct mcb_device *mdev = to_mcb_device(dev); 87 + struct module *carrier_mod; 76 88 77 89 mdrv->remove(mdev); 90 + 91 + carrier_mod = mdev->dev.parent->driver->owner; 92 + module_put(carrier_mod); 78 93 79 94 put_device(&mdev->dev); 80 95
+1 -1
drivers/misc/mei/client.c
··· 730 730 /* synchronized under device mutex */ 731 731 if (waitqueue_active(&cl->wait)) { 732 732 cl_dbg(dev, cl, "Waking up ctrl write clients!\n"); 733 - wake_up_interruptible(&cl->wait); 733 + wake_up(&cl->wait); 734 734 } 735 735 } 736 736