Unverified Commit b69d4813 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'riscv-soc-fixes-for-v7.0-rc1' of...

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: default avatarConor 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: default avatarArnd Bergmann <arnd@arndb.de>
parents 11439c46 0528a348
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -428,6 +428,7 @@ can0: can@2010c000 {
			clocks = <&clkcfg CLK_CAN0>, <&clkcfg CLK_MSSPLL3>;
			interrupt-parent = <&plic>;
			interrupts = <56>;
			resets = <&mss_top_sysreg CLK_CAN0>;
			status = "disabled";
		};

@@ -437,6 +438,7 @@ can1: can@2010d000 {
			clocks = <&clkcfg CLK_CAN1>, <&clkcfg CLK_MSSPLL3>;
			interrupt-parent = <&plic>;
			interrupts = <57>;
			resets = <&mss_top_sysreg CLK_CAN1>;
			status = "disabled";
		};

+2 −2
Original line number Diff line number Diff line
@@ -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;

+2 −2
Original line number Diff line number Diff line
@@ -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;

+9 −4
Original line number Diff line number Diff line
@@ -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 @@ static int mpfs_sys_controller_probe(struct platform_device *pdev)
	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 @@ static int mpfs_sys_controller_probe(struct platform_device *pdev)
	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)