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 'mtd/fixes-for-6.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux

Pull mtd fixes from Miquel Raynal:
"MTD core:
- partitions: Add missing of_node_get() in dynamic partitions code

Parser drivers:
- bcm47xxpart: Fix halfblock reads

Raw NAND controller drivers:
- marvell: Use correct logic for nand-keep-config
- tegra: Fix PM disable depth imbalance in probe
- intel: Add missing of_node_put() in ebu_nand_probe()

SPI-NOR core changes:
- Ignore -ENOTSUPP in spi_nor_init()"

* tag 'mtd/fixes-for-6.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
mtd: parsers: bcm47xxpart: Fix halfblock reads
mtd: rawnand: marvell: Use correct logic for nand-keep-config
mtd: rawnand: tegra: Fix PM disable depth imbalance in probe
mtd: rawnand: intel: Add missing of_node_put() in ebu_nand_probe()
mtd: core: add missing of_node_get() in dynamic partitions code
mtd: spi-nor: core: Ignore -ENOTSUPP in spi_nor_init()

+25 -14
+1 -1
drivers/mtd/mtdcore.c
··· 562 562 if (!mtd_is_partition(mtd)) 563 563 return; 564 564 parent = mtd->parent; 565 - parent_dn = dev_of_node(&parent->dev); 565 + parent_dn = of_node_get(dev_of_node(&parent->dev)); 566 566 if (!parent_dn) 567 567 return; 568 568
+15 -8
drivers/mtd/nand/raw/intel-nand-controller.c
··· 608 608 ret = of_property_read_u32(chip_np, "reg", &cs); 609 609 if (ret) { 610 610 dev_err(dev, "failed to get chip select: %d\n", ret); 611 - return ret; 611 + goto err_of_node_put; 612 612 } 613 613 if (cs >= MAX_CS) { 614 614 dev_err(dev, "got invalid chip select: %d\n", cs); 615 - return -EINVAL; 615 + ret = -EINVAL; 616 + goto err_of_node_put; 616 617 } 617 618 618 619 ebu_host->cs_num = cs; ··· 621 620 resname = devm_kasprintf(dev, GFP_KERNEL, "nand_cs%d", cs); 622 621 ebu_host->cs[cs].chipaddr = devm_platform_ioremap_resource_byname(pdev, 623 622 resname); 624 - if (IS_ERR(ebu_host->cs[cs].chipaddr)) 625 - return PTR_ERR(ebu_host->cs[cs].chipaddr); 623 + if (IS_ERR(ebu_host->cs[cs].chipaddr)) { 624 + ret = PTR_ERR(ebu_host->cs[cs].chipaddr); 625 + goto err_of_node_put; 626 + } 626 627 627 628 ebu_host->clk = devm_clk_get(dev, NULL); 628 - if (IS_ERR(ebu_host->clk)) 629 - return dev_err_probe(dev, PTR_ERR(ebu_host->clk), 630 - "failed to get clock\n"); 629 + if (IS_ERR(ebu_host->clk)) { 630 + ret = dev_err_probe(dev, PTR_ERR(ebu_host->clk), 631 + "failed to get clock\n"); 632 + goto err_of_node_put; 633 + } 631 634 632 635 ret = clk_prepare_enable(ebu_host->clk); 633 636 if (ret) { 634 637 dev_err(dev, "failed to enable clock: %d\n", ret); 635 - return ret; 638 + goto err_of_node_put; 636 639 } 637 640 638 641 ebu_host->dma_tx = dma_request_chan(dev, "tx"); ··· 700 695 ebu_dma_cleanup(ebu_host); 701 696 err_disable_unprepare_clk: 702 697 clk_disable_unprepare(ebu_host->clk); 698 + err_of_node_put: 699 + of_node_put(chip_np); 703 700 704 701 return ret; 705 702 }
+1 -1
drivers/mtd/nand/raw/marvell_nand.c
··· 2678 2678 chip->controller = &nfc->controller; 2679 2679 nand_set_flash_node(chip, np); 2680 2680 2681 - if (!of_property_read_bool(np, "marvell,nand-keep-config")) 2681 + if (of_property_read_bool(np, "marvell,nand-keep-config")) 2682 2682 chip->options |= NAND_KEEP_TIMINGS; 2683 2683 2684 2684 mtd = nand_to_mtd(chip);
+3 -1
drivers/mtd/nand/raw/tegra_nand.c
··· 1181 1181 pm_runtime_enable(&pdev->dev); 1182 1182 err = pm_runtime_resume_and_get(&pdev->dev); 1183 1183 if (err) 1184 - return err; 1184 + goto err_dis_pm; 1185 1185 1186 1186 err = reset_control_reset(rst); 1187 1187 if (err) { ··· 1215 1215 err_put_pm: 1216 1216 pm_runtime_put_sync_suspend(ctrl->dev); 1217 1217 pm_runtime_force_suspend(ctrl->dev); 1218 + err_dis_pm: 1219 + pm_runtime_disable(&pdev->dev); 1218 1220 return err; 1219 1221 } 1220 1222
+2 -2
drivers/mtd/parsers/bcm47xxpart.c
··· 233 233 } 234 234 235 235 /* Read middle of the block */ 236 - err = mtd_read(master, offset + 0x8000, 0x4, &bytes_read, 236 + err = mtd_read(master, offset + (blocksize / 2), 0x4, &bytes_read, 237 237 (uint8_t *)buf); 238 238 if (err && !mtd_is_bitflip(err)) { 239 239 pr_err("mtd_read error while parsing (offset: 0x%X): %d\n", 240 - offset + 0x8000, err); 240 + offset + (blocksize / 2), err); 241 241 continue; 242 242 } 243 243
+3 -1
drivers/mtd/spi-nor/core.c
··· 2724 2724 */ 2725 2725 WARN_ONCE(nor->flags & SNOR_F_BROKEN_RESET, 2726 2726 "enabling reset hack; may not recover from unexpected reboots\n"); 2727 - return nor->params->set_4byte_addr_mode(nor, true); 2727 + err = nor->params->set_4byte_addr_mode(nor, true); 2728 + if (err && err != -ENOTSUPP) 2729 + return err; 2728 2730 } 2729 2731 2730 2732 return 0;