mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-03 23:37:40 -04:00
Merge tag 'riscv-soc-fixes-for-v7.0-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into arm/fixes
RISC-V soc fixes for v7.0-rc1 drivers: Fix leaks in probe/init function teardown code in three drivers. microchip: Fix a warning introduced by a recent binding change, that made resets required on Polarfire SoC's CAN IP. Signed-off-by: Conor Dooley <conor.dooley@microchip.com> * tag 'riscv-soc-fixes-for-v7.0-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: cache: ax45mp: Fix device node reference leak in ax45mp_cache_init() cache: starfive: fix device node leak in starlink_cache_init() riscv: dts: microchip: add can resets to mpfs soc: microchip: mpfs: Fix memory leak in mpfs_sys_controller_probe() Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -428,6 +428,7 @@
|
||||
clocks = <&clkcfg CLK_CAN0>, <&clkcfg CLK_MSSPLL3>;
|
||||
interrupt-parent = <&plic>;
|
||||
interrupts = <56>;
|
||||
resets = <&mss_top_sysreg CLK_CAN0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -437,6 +438,7 @@
|
||||
clocks = <&clkcfg CLK_CAN1>, <&clkcfg CLK_MSSPLL3>;
|
||||
interrupt-parent = <&plic>;
|
||||
interrupts = <57>;
|
||||
resets = <&mss_top_sysreg CLK_CAN1>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
||||
4
drivers/cache/ax45mp_cache.c
vendored
4
drivers/cache/ax45mp_cache.c
vendored
@@ -178,11 +178,11 @@ static const struct of_device_id ax45mp_cache_ids[] = {
|
||||
|
||||
static int __init ax45mp_cache_init(void)
|
||||
{
|
||||
struct device_node *np;
|
||||
struct resource res;
|
||||
int ret;
|
||||
|
||||
np = of_find_matching_node(NULL, ax45mp_cache_ids);
|
||||
struct device_node *np __free(device_node) =
|
||||
of_find_matching_node(NULL, ax45mp_cache_ids);
|
||||
if (!of_device_is_available(np))
|
||||
return -ENODEV;
|
||||
|
||||
|
||||
4
drivers/cache/starfive_starlink_cache.c
vendored
4
drivers/cache/starfive_starlink_cache.c
vendored
@@ -102,11 +102,11 @@ static const struct of_device_id starlink_cache_ids[] = {
|
||||
|
||||
static int __init starlink_cache_init(void)
|
||||
{
|
||||
struct device_node *np;
|
||||
u32 block_size;
|
||||
int ret;
|
||||
|
||||
np = of_find_matching_node(NULL, starlink_cache_ids);
|
||||
struct device_node *np __free(device_node) =
|
||||
of_find_matching_node(NULL, starlink_cache_ids);
|
||||
if (!of_device_is_available(np))
|
||||
return -ENODEV;
|
||||
|
||||
|
||||
@@ -142,8 +142,10 @@ static int mpfs_sys_controller_probe(struct platform_device *pdev)
|
||||
|
||||
sys_controller->flash = of_get_mtd_device_by_node(np);
|
||||
of_node_put(np);
|
||||
if (IS_ERR(sys_controller->flash))
|
||||
return dev_err_probe(dev, PTR_ERR(sys_controller->flash), "Failed to get flash\n");
|
||||
if (IS_ERR(sys_controller->flash)) {
|
||||
ret = dev_err_probe(dev, PTR_ERR(sys_controller->flash), "Failed to get flash\n");
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
no_flash:
|
||||
sys_controller->client.dev = dev;
|
||||
@@ -155,8 +157,7 @@ no_flash:
|
||||
if (IS_ERR(sys_controller->chan)) {
|
||||
ret = dev_err_probe(dev, PTR_ERR(sys_controller->chan),
|
||||
"Failed to get mbox channel\n");
|
||||
kfree(sys_controller);
|
||||
return ret;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
init_completion(&sys_controller->c);
|
||||
@@ -174,6 +175,10 @@ no_flash:
|
||||
dev_info(&pdev->dev, "Registered MPFS system controller\n");
|
||||
|
||||
return 0;
|
||||
|
||||
out_free:
|
||||
kfree(sys_controller);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void mpfs_sys_controller_remove(struct platform_device *pdev)
|
||||
|
||||
Reference in New Issue
Block a user