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 'staging-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging fixes from Greg KH:
"Here are some staging driver fixes for 3.18-rc3. Mostly iio and
comedi driver fixes for issues reported by people.

All of these have been in linux-next for a while with no reported
issues"

* tag 'staging-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: comedi: fix memory leak / bad pointer freeing for chanlist
staging: comedi: Kconfig: fix config COMEDI_ADDI_APCI_3120 dependants
staging: comedi: widen subdevice number argument in ioctl handlers
staging: rtl8723au: Fix alignment of mac_addr for ether_addr_copy() usage
drivers/staging/comedi/Kconfig: Let COMEDI_II_PCI20KC depend on HAS_IOMEM
staging: comedi: (regression) channel list must be set for COMEDI_CMD ioctl
iio: adc: mxs-lradc: Disable the clock on probe failure
iio: st_sensors: Fix buffer copy
staging:iio:ad5933: Drop "raw" from channel names
staging:iio:ad5933: Fix NULL pointer deref when enabling buffer

+31 -28
+1 -1
drivers/iio/common/st_sensors/st_sensors_buffer.c
··· 71 71 goto st_sensors_free_memory; 72 72 } 73 73 74 - for (i = 0; i < n * num_data_channels; i++) { 74 + for (i = 0; i < n * byte_for_channel; i++) { 75 75 if (i < n) 76 76 buf[i] = rx_array[i]; 77 77 else
+1 -1
drivers/staging/comedi/Kconfig
··· 426 426 427 427 config COMEDI_II_PCI20KC 428 428 tristate "Intelligent Instruments PCI-20001C carrier support" 429 + depends on HAS_IOMEM 429 430 ---help--- 430 431 Enable support for Intelligent Instruments PCI-20001C carrier 431 432 PCI-20001, PCI-20006 and PCI-20341 ··· 668 667 config COMEDI_ADDI_APCI_3120 669 668 tristate "ADDI-DATA APCI_3120/3001 support" 670 669 depends on HAS_DMA 671 - depends on VIRT_TO_BUS 672 670 ---help--- 673 671 Enable support for ADDI-DATA APCI_3120/3001 cards 674 672
+14 -12
drivers/staging/comedi/comedi_fops.c
··· 1462 1462 unsigned int *chanlist; 1463 1463 int ret; 1464 1464 1465 - /* user_chanlist could be NULL for do_cmdtest ioctls */ 1466 - if (!user_chanlist) 1467 - return 0; 1468 - 1465 + cmd->chanlist = NULL; 1469 1466 chanlist = memdup_user(user_chanlist, 1470 1467 cmd->chanlist_len * sizeof(unsigned int)); 1471 1468 if (IS_ERR(chanlist)) ··· 1606 1609 1607 1610 s = &dev->subdevices[cmd.subdev]; 1608 1611 1609 - /* load channel/gain list */ 1610 - ret = __comedi_get_user_chanlist(dev, s, user_chanlist, &cmd); 1611 - if (ret) 1612 - return ret; 1612 + /* user_chanlist can be NULL for COMEDI_CMDTEST ioctl */ 1613 + if (user_chanlist) { 1614 + /* load channel/gain list */ 1615 + ret = __comedi_get_user_chanlist(dev, s, user_chanlist, &cmd); 1616 + if (ret) 1617 + return ret; 1618 + } 1613 1619 1614 1620 ret = s->do_cmdtest(dev, s, &cmd); 1621 + 1622 + kfree(cmd.chanlist); /* free kernel copy of user chanlist */ 1615 1623 1616 1624 /* restore chanlist pointer before copying back */ 1617 1625 cmd.chanlist = (unsigned int __force *)user_chanlist; ··· 1644 1642 1645 1643 */ 1646 1644 1647 - static int do_lock_ioctl(struct comedi_device *dev, unsigned int arg, 1645 + static int do_lock_ioctl(struct comedi_device *dev, unsigned long arg, 1648 1646 void *file) 1649 1647 { 1650 1648 int ret = 0; ··· 1681 1679 This function isn't protected by the semaphore, since 1682 1680 we already own the lock. 1683 1681 */ 1684 - static int do_unlock_ioctl(struct comedi_device *dev, unsigned int arg, 1682 + static int do_unlock_ioctl(struct comedi_device *dev, unsigned long arg, 1685 1683 void *file) 1686 1684 { 1687 1685 struct comedi_subdevice *s; ··· 1716 1714 nothing 1717 1715 1718 1716 */ 1719 - static int do_cancel_ioctl(struct comedi_device *dev, unsigned int arg, 1717 + static int do_cancel_ioctl(struct comedi_device *dev, unsigned long arg, 1720 1718 void *file) 1721 1719 { 1722 1720 struct comedi_subdevice *s; ··· 1753 1751 nothing 1754 1752 1755 1753 */ 1756 - static int do_poll_ioctl(struct comedi_device *dev, unsigned int arg, 1754 + static int do_poll_ioctl(struct comedi_device *dev, unsigned long arg, 1757 1755 void *file) 1758 1756 { 1759 1757 struct comedi_subdevice *s;
+8 -4
drivers/staging/iio/adc/mxs-lradc.c
··· 1559 1559 /* Grab all IRQ sources */ 1560 1560 for (i = 0; i < of_cfg->irq_count; i++) { 1561 1561 lradc->irq[i] = platform_get_irq(pdev, i); 1562 - if (lradc->irq[i] < 0) 1563 - return lradc->irq[i]; 1562 + if (lradc->irq[i] < 0) { 1563 + ret = lradc->irq[i]; 1564 + goto err_clk; 1565 + } 1564 1566 1565 1567 ret = devm_request_irq(dev, lradc->irq[i], 1566 1568 mxs_lradc_handle_irq, 0, 1567 1569 of_cfg->irq_name[i], iio); 1568 1570 if (ret) 1569 - return ret; 1571 + goto err_clk; 1570 1572 } 1571 1573 1572 1574 lradc->vref_mv = of_cfg->vref_mv; ··· 1590 1588 &mxs_lradc_trigger_handler, 1591 1589 &mxs_lradc_buffer_ops); 1592 1590 if (ret) 1593 - return ret; 1591 + goto err_clk; 1594 1592 1595 1593 ret = mxs_lradc_trigger_init(iio); 1596 1594 if (ret) ··· 1645 1643 mxs_lradc_trigger_remove(iio); 1646 1644 err_trig: 1647 1645 iio_triggered_buffer_cleanup(iio); 1646 + err_clk: 1647 + clk_disable_unprepare(lradc->clk); 1648 1648 return ret; 1649 1649 } 1650 1650
+6 -9
drivers/staging/iio/impedance-analyzer/ad5933.c
··· 115 115 .channel = 0, 116 116 .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED), 117 117 .address = AD5933_REG_TEMP_DATA, 118 + .scan_index = -1, 118 119 .scan_type = { 119 120 .sign = 's', 120 121 .realbits = 14, ··· 125 124 .type = IIO_VOLTAGE, 126 125 .indexed = 1, 127 126 .channel = 0, 128 - .extend_name = "real_raw", 129 - .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | 130 - BIT(IIO_CHAN_INFO_SCALE), 127 + .extend_name = "real", 131 128 .address = AD5933_REG_REAL_DATA, 132 129 .scan_index = 0, 133 130 .scan_type = { ··· 137 138 .type = IIO_VOLTAGE, 138 139 .indexed = 1, 139 140 .channel = 0, 140 - .extend_name = "imag_raw", 141 - .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | 142 - BIT(IIO_CHAN_INFO_SCALE), 141 + .extend_name = "imag", 143 142 .address = AD5933_REG_IMAG_DATA, 144 143 .scan_index = 1, 145 144 .scan_type = { ··· 746 749 indio_dev->name = id->name; 747 750 indio_dev->modes = INDIO_DIRECT_MODE; 748 751 indio_dev->channels = ad5933_channels; 749 - indio_dev->num_channels = 1; /* only register temp0_input */ 752 + indio_dev->num_channels = ARRAY_SIZE(ad5933_channels); 750 753 751 754 ret = ad5933_register_ring_funcs_and_init(indio_dev); 752 755 if (ret) 753 756 goto error_disable_reg; 754 757 755 - /* skip temp0_input, register in0_(real|imag)_raw */ 756 - ret = iio_buffer_register(indio_dev, &ad5933_channels[1], 2); 758 + ret = iio_buffer_register(indio_dev, ad5933_channels, 759 + ARRAY_SIZE(ad5933_channels)); 757 760 if (ret) 758 761 goto error_unreg_ring; 759 762
+1 -1
drivers/staging/rtl8723au/include/rtw_eeprom.h
··· 107 107 }; 108 108 109 109 struct eeprom_priv { 110 + u8 mac_addr[6]; /* PermanentAddress */ 110 111 u8 bautoload_fail_flag; 111 112 u8 bloadfile_fail_flag; 112 113 u8 bloadmac_fail_flag; 113 114 /* u8 bempty; */ 114 115 /* u8 sys_config; */ 115 - u8 mac_addr[6]; /* PermanentAddress */ 116 116 /* u8 config0; */ 117 117 u16 channel_plan; 118 118 /* u8 country_string[3]; */