1. 21 Apr, 2022 1 commit
    • Wei Yongjun's avatar
      regulator: da9121: Fix uninit-value in da9121_assign_chip_model() · bab76514
      Wei Yongjun authored
      KASAN report slab-out-of-bounds in __regmap_init as follows:
      
      BUG: KASAN: slab-out-of-bounds in __regmap_init drivers/base/regmap/regmap.c:841
      Read of size 1 at addr ffff88803678cdf1 by task xrun/9137
      
      CPU: 0 PID: 9137 Comm: xrun Tainted: G        W         5.18.0-rc2
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
      Call Trace:
       <TASK>
       dump_stack_lvl+0xe8/0x15a lib/dump_stack.c:88
       print_report.cold+0xcd/0x69b mm/kasan/report.c:313
       kasan_report+0x8e/0xc0 mm/kasan/report.c:491
       __regmap_init+0x4540/0x4ba0 drivers/base/regmap/regmap.c:841
       __devm_regmap_init+0x7a/0x100 drivers/base/regmap/regmap.c:1266
       __devm_regmap_init_i2c+0x65/0x80 drivers/base/regmap/regmap-i2c.c:394
       da9121_i2c_probe+0x386/0x6d1 drivers/regulator/da9121-regulator.c:1039
       i2c_device_probe+0x959/0xac0 drivers/i2c/i2c-core-base.c:563
      
      This happend when da9121 device is probe by da9121_i2c_id, but with
      invalid dts. Thus, chip->subvariant_id is set to -EINVAL, and later
      da9121_assign_chip_model() will access 'regmap' without init it.
      
      Fix it by return -EINVAL from da9121_assign_chip_model() if
      'chip->subvariant_id' is invalid.
      
      Fixes: f3fbd556 ("regulator: da9121: Add device variants")
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
      Reviewed-by: default avatarAdam Ward <Adam.Ward.Opensource@diasemi.com>
      Link: https://lore.kernel.org/r/20220421090335.1876149-1-weiyongjun1@huawei.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      bab76514
  2. 19 Apr, 2022 1 commit
  3. 13 Apr, 2022 1 commit
  4. 07 Apr, 2022 3 commits
  5. 06 Apr, 2022 1 commit
  6. 05 Apr, 2022 2 commits
    • Mark Brown's avatar
      Add support for MediaTek PMIC MT6366 · 31058401
      Mark Brown authored
      Merge series from Johnson Wang <johnson.wang@mediatek.com>:
      
      This patchset adds support for MediaTek PMIC MT6366.
      MT6366 is the primary PMIC for MT8186 and probably other SOCs.
      31058401
    • Mark Brown's avatar
      regulator: Add support for MediaTek PMIC MT6366 · 610d8188
      Mark Brown authored
      Merge series from Johnson Wang <johnson.wang@mediatek.com>:
      
      This patchset adds support for MediaTek PMIC MT6366.
      MT6366 is the primary PMIC for MT8186 and probably other SOCs.
      610d8188
  7. 04 Apr, 2022 9 commits
  8. 03 Apr, 2022 8 commits
  9. 02 Apr, 2022 14 commits