Commit 1216037a authored by Olof Johansson's avatar Olof Johansson

Merge tag 'memory-controller-drv-5.14' of...

Merge tag 'memory-controller-drv-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers

Memory controller drivers for v5.14

Several small fixes and cleanups for stm32, atmel, pl353, renesas-rpc,
TI emif and fsl_ifc.

* tag 'memory-controller-drv-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
  memory: emif: remove unused frequency and voltage notifiers
  memory: fsl_ifc: fix leak of private memory on probe failure
  memory: fsl_ifc: fix leak of IO mapping on probe failure
  MAINTAINERS: memory: cover also header file
  memory: renesas-rpc-if: correct whitespace
  memory: pl353: Fix error return code in pl353_smc_probe()
  memory: atmel-ebi: add missing of_node_put for loop iteration
  memory: stm32-fmc2-ebi: add missing of_node_put for loop iteration

Link: https://lore.kernel.org/r/20210611140659.61980-1-krzysztof.kozlowski@canonical.comSigned-off-by: default avatarOlof Johansson <olof@lixom.net>
parents 97a56667 729a611e
...@@ -11796,6 +11796,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl.git ...@@ -11796,6 +11796,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl.git
F: Documentation/devicetree/bindings/memory-controllers/ F: Documentation/devicetree/bindings/memory-controllers/
F: drivers/memory/ F: drivers/memory/
F: include/dt-bindings/memory/ F: include/dt-bindings/memory/
F: include/memory/
MEMORY FREQUENCY SCALING DRIVERS FOR NVIDIA TEGRA MEMORY FREQUENCY SCALING DRIVERS FOR NVIDIA TEGRA
M: Dmitry Osipenko <digetx@gmail.com> M: Dmitry Osipenko <digetx@gmail.com>
......
...@@ -600,10 +600,12 @@ static int atmel_ebi_probe(struct platform_device *pdev) ...@@ -600,10 +600,12 @@ static int atmel_ebi_probe(struct platform_device *pdev)
child); child);
ret = atmel_ebi_dev_disable(ebi, child); ret = atmel_ebi_dev_disable(ebi, child);
if (ret) if (ret) {
of_node_put(child);
return ret; return ret;
} }
} }
}
return of_platform_populate(np, NULL, NULL, dev); return of_platform_populate(np, NULL, NULL, dev);
} }
......
This diff is collapsed.
...@@ -97,7 +97,6 @@ static int fsl_ifc_ctrl_remove(struct platform_device *dev) ...@@ -97,7 +97,6 @@ static int fsl_ifc_ctrl_remove(struct platform_device *dev)
iounmap(ctrl->gregs); iounmap(ctrl->gregs);
dev_set_drvdata(&dev->dev, NULL); dev_set_drvdata(&dev->dev, NULL);
kfree(ctrl);
return 0; return 0;
} }
...@@ -209,7 +208,8 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev) ...@@ -209,7 +208,8 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev)
dev_info(&dev->dev, "Freescale Integrated Flash Controller\n"); dev_info(&dev->dev, "Freescale Integrated Flash Controller\n");
fsl_ifc_ctrl_dev = kzalloc(sizeof(*fsl_ifc_ctrl_dev), GFP_KERNEL); fsl_ifc_ctrl_dev = devm_kzalloc(&dev->dev, sizeof(*fsl_ifc_ctrl_dev),
GFP_KERNEL);
if (!fsl_ifc_ctrl_dev) if (!fsl_ifc_ctrl_dev)
return -ENOMEM; return -ENOMEM;
...@@ -219,8 +219,7 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev) ...@@ -219,8 +219,7 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev)
fsl_ifc_ctrl_dev->gregs = of_iomap(dev->dev.of_node, 0); fsl_ifc_ctrl_dev->gregs = of_iomap(dev->dev.of_node, 0);
if (!fsl_ifc_ctrl_dev->gregs) { if (!fsl_ifc_ctrl_dev->gregs) {
dev_err(&dev->dev, "failed to get memory region\n"); dev_err(&dev->dev, "failed to get memory region\n");
ret = -ENODEV; return -ENODEV;
goto err;
} }
if (of_property_read_bool(dev->dev.of_node, "little-endian")) { if (of_property_read_bool(dev->dev.of_node, "little-endian")) {
...@@ -295,6 +294,7 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev) ...@@ -295,6 +294,7 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev)
free_irq(fsl_ifc_ctrl_dev->irq, fsl_ifc_ctrl_dev); free_irq(fsl_ifc_ctrl_dev->irq, fsl_ifc_ctrl_dev);
irq_dispose_mapping(fsl_ifc_ctrl_dev->irq); irq_dispose_mapping(fsl_ifc_ctrl_dev->irq);
err: err:
iounmap(fsl_ifc_ctrl_dev->gregs);
return ret; return ret;
} }
......
...@@ -407,6 +407,7 @@ static int pl353_smc_probe(struct amba_device *adev, const struct amba_id *id) ...@@ -407,6 +407,7 @@ static int pl353_smc_probe(struct amba_device *adev, const struct amba_id *id)
break; break;
} }
if (!match) { if (!match) {
err = -ENODEV;
dev_err(&adev->dev, "no matching children\n"); dev_err(&adev->dev, "no matching children\n");
goto out_clk_disable; goto out_clk_disable;
} }
......
...@@ -1048,16 +1048,19 @@ static int stm32_fmc2_ebi_parse_dt(struct stm32_fmc2_ebi *ebi) ...@@ -1048,16 +1048,19 @@ static int stm32_fmc2_ebi_parse_dt(struct stm32_fmc2_ebi *ebi)
if (ret) { if (ret) {
dev_err(dev, "could not retrieve reg property: %d\n", dev_err(dev, "could not retrieve reg property: %d\n",
ret); ret);
of_node_put(child);
return ret; return ret;
} }
if (bank >= FMC2_MAX_BANKS) { if (bank >= FMC2_MAX_BANKS) {
dev_err(dev, "invalid reg value: %d\n", bank); dev_err(dev, "invalid reg value: %d\n", bank);
of_node_put(child);
return -EINVAL; return -EINVAL;
} }
if (ebi->bank_assigned & BIT(bank)) { if (ebi->bank_assigned & BIT(bank)) {
dev_err(dev, "bank already assigned: %d\n", bank); dev_err(dev, "bank already assigned: %d\n", bank);
of_node_put(child);
return -EINVAL; return -EINVAL;
} }
...@@ -1066,6 +1069,7 @@ static int stm32_fmc2_ebi_parse_dt(struct stm32_fmc2_ebi *ebi) ...@@ -1066,6 +1069,7 @@ static int stm32_fmc2_ebi_parse_dt(struct stm32_fmc2_ebi *ebi)
if (ret) { if (ret) {
dev_err(dev, "setup chip select %d failed: %d\n", dev_err(dev, "setup chip select %d failed: %d\n",
bank, ret); bank, ret);
of_node_put(child);
return ret; return ret;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment