1. 03 Sep, 2019 13 commits
  2. 31 Aug, 2019 3 commits
    • Wenwen Wang's avatar
      hwmon (coretemp) Fix a memory leak bug · e027a2de
      Wenwen Wang authored
      In coretemp_init(), 'zone_devices' is allocated through kcalloc().
      However, it is not deallocated in the following execution if
      platform_driver_register() fails, leading to a memory leak. To fix this
      issue, introduce the 'outzone' label to free 'zone_devices' before
      returning the error.
      Signed-off-by: default avatarWenwen Wang <wenwen@cs.uga.edu>
      Link: https://lore.kernel.org/r/1566248402-6538-1-git-send-email-wenwen@cs.uga.eduSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      e027a2de
    • Guenter Roeck's avatar
      hwmon: (lm75) Fix write operations for negative temperatures · 7d82fcc9
      Guenter Roeck authored
      Writes into limit registers fail if the temperature written is negative.
      The regmap write operation checks the value range, regmap_write accepts
      an unsigned int as parameter, and the temperature value passed to
      regmap_write is kept in a variable declared as long. Negative values
      are converted large unsigned integers, which fails the range check.
      Fix by type casting the temperature to u16 when calling regmap_write().
      
      Cc: Iker Perez del Palomar Sustatxa <iker.perez@codethink.co.uk>
      Fixes: e65365fe ("hwmon: (lm75) Convert to use regmap")
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      7d82fcc9
    • Bartosz Golaszewski's avatar
      hwmon: pmbus: ucd9000: remove unneeded include · 6f8c8f3c
      Bartosz Golaszewski authored
      Build bot reports the following build issue after commit 9091373a
      ("gpio: remove less important #ifdef around declarations):
      
         In file included from drivers/hwmon/pmbus/ucd9000.c:19:0:
      >> include/linux/gpio/driver.h:576:1: error: redefinition of 'gpiochip_add_pin_range'
          gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
          ^~~~~~~~~~~~~~~~~~~~~~
         In file included from drivers/hwmon/pmbus/ucd9000.c:18:0:
         include/linux/gpio.h:245:1: note: previous definition of 'gpiochip_add_pin_range' was here
          gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
          ^~~~~~~~~~~~~~~~~~~~~~
         In file included from drivers/hwmon/pmbus/ucd9000.c:19:0:
      >> include/linux/gpio/driver.h:583:1: error: redefinition of 'gpiochip_add_pingroup_range'
          gpiochip_add_pingroup_range(struct gpio_chip *chip,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
         In file included from drivers/hwmon/pmbus/ucd9000.c:18:0:
         include/linux/gpio.h:254:1: note: previous definition of 'gpiochip_add_pingroup_range' was here
          gpiochip_add_pingroup_range(struct gpio_chip *chip,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
         In file included from drivers/hwmon/pmbus/ucd9000.c:19:0:
      >> include/linux/gpio/driver.h:591:1: error: redefinition of 'gpiochip_remove_pin_ranges'
          gpiochip_remove_pin_ranges(struct gpio_chip *chip)
          ^~~~~~~~~~~~~~~~~~~~~~~~~~
         In file included from drivers/hwmon/pmbus/ucd9000.c:18:0:
         include/linux/gpio.h:263:1: note: previous definition of 'gpiochip_remove_pin_ranges' was here
          gpiochip_remove_pin_ranges(struct gpio_chip *chip)
      
      This is caused by conflicting defines from linux/gpio.h and
      linux/gpio/driver.h. Drivers should not include both the legacy and
      the new API headers. This driver doesn't even use linux/gpio.h so
      remove it.
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
      Link: https://lore.kernel.org/r/20190808080144.6183-1-brgl@bgdev.plSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      6f8c8f3c
  3. 25 Aug, 2019 22 commits
  4. 24 Aug, 2019 2 commits
    • Linus Torvalds's avatar
      Merge tag 'gpio-v5.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · 083f0f2c
      Linus Torvalds authored
      Pull GPIO fixes from Linus Walleij:
       "Here is a (hopefully last) set of GPIO fixes for the v5.3 kernel
        cycle. Two are pretty core:
      
         - Fix not reporting open drain/source lines to userspace as "input"
      
         - Fix a minor build error found in randconfigs
      
         - Fix a chip select quirk on the Freescale SPI
      
         - Fix the irqchip initialization semantic order to reflect what it
           was using the old API"
      
      * tag 'gpio-v5.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        gpio: Fix irqchip initialization order
        gpio: of: fix Freescale SPI CS quirk handling
        gpio: Fix build error of function redefinition
        gpiolib: never report open-drain/source lines as 'input' to user-space
      083f0f2c
    • Linus Torvalds's avatar
      Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux · 36146921
      Linus Torvalds authored
      Pull Hyper-V fixes from Sasha Levin:
      
       - Fix for panics and network failures on PAE guests by Dexuan Cui.
      
       - Fix of a memory leak (and related cleanups) in the hyper-v keyboard
         driver by Dexuan Cui.
      
       - Code cleanups for hyper-v clocksource driver during the merge window
         by Dexuan Cui.
      
       - Fix for a false positive warning in the userspace hyper-v KVP store
         by Vitaly Kuznetsov.
      
      * tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
        Drivers: hv: vmbus: Fix virt_to_hvpfn() for X86_PAE
        Tools: hv: kvp: eliminate 'may be used uninitialized' warning
        Input: hyperv-keyboard: Use in-place iterator API in the channel callback
        Drivers: hv: vmbus: Remove the unused "tsc_page" from struct hv_context
      36146921