mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
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> -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCaY8VUwAKCRB4tDGHoIJi 0o31AQCRZQPV67qSeKLMPY5dATfLHusn20hS/1O06o7i8xZj7wD9FqpmVrjDI/J2 ZuwxuQzrhRfW23/W3eYpg748BgoIpAw= =1ozE -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmmol4EACgkQmmx57+YA GNnI7A/+NdsWVSswdf5wdsSK/s4Zy8htweI5eYHAgyqILqMLFrE3TwLxV3bZz21z g5xI6kE+ptn7mgD/tVKz6Sf4vIwaUxko57LvCFr+m9A7MlkdDcto/GwhWLUWRBFv s0WQr/kWN+5DOPAhBlWtKLP1qwWC6KwqgxfHtgAoWmIDe5plTrGnPib7MmczNPCU kXPeDGJYgFiFb1j/MA9qW7rhJFvQEoj79FNrnMxykRIG1LRTwtTlTSdfF38N3L+h RqanciEIv0T6shapXRknkLYBUtwfeVaez4UklyeWWVRfFzKcvVaRoyH2ASdYAdRI Xf3OKpkQCVfKTeugevUA4N6YylpbWBt7sqmnuSzVGxIVl7iUTNXgCJ2Y74Gh6DXb BrK2rgtgVZ/Nckf/0hDmLCSiP951wBPm99ot4GSmuGpjDBa2ZF+OPiGrOWrHfQOt RaNCQR6OMj8uQuIVpOrTb/dJC0hXZ9drPVK5MNGTrLN77VDvB8CYMELMr5FEEp8V 5bMSNQEmLMUmfTTZaFBs8kHsNdTItxflTy/wCnu9HNuwjF/HW5kTPcka2yC/Inss wEu2FP1kQoiyCydPBbRxArVQvnGxQxzzmYf1A6FRCDBNBC1xdbznWUDs+RUzXW2z mctPf6+Zl4zYsmy5R1Em1vtpH7wF33A9hPz17qacvGOf87XmaQs= =KGf5 -----END PGP SIGNATURE----- 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:
commit
b69d48137e
|
|
@ -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";
|
||||
};
|
||||
|
||||
|
|
|
|||
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 @@ 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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user