mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-18 02:46:06 +00:00
firmware: xilinx: Fix an error handling path in 'zynqmp_firmware_probe()'
If 'mfd_add_devices()' fails, we must undo 'zynqmp_pm_api_debugfs_init()' otherwise some debugfs directory and files will be left. Just move the call to 'zynqmp_pm_api_debugfs_init()' a few lines below to fix the issue. Fixes: e23d9c6d0d49 ("drivers: soc: xilinx: Add ZynqMP power domain driver") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Jolly Shah <jolly.shah@xilinx.com> Link: https://lore.kernel.org/r/20200510130357.233364-1-christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
286adb4cce
commit
65f0539b1d
@ -1235,8 +1235,6 @@ static int zynqmp_firmware_probe(struct platform_device *pdev)
|
|||||||
pr_info("%s Trustzone version v%d.%d\n", __func__,
|
pr_info("%s Trustzone version v%d.%d\n", __func__,
|
||||||
pm_tz_version >> 16, pm_tz_version & 0xFFFF);
|
pm_tz_version >> 16, pm_tz_version & 0xFFFF);
|
||||||
|
|
||||||
zynqmp_pm_api_debugfs_init();
|
|
||||||
|
|
||||||
ret = mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE, firmware_devs,
|
ret = mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE, firmware_devs,
|
||||||
ARRAY_SIZE(firmware_devs), NULL, 0, NULL);
|
ARRAY_SIZE(firmware_devs), NULL, 0, NULL);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
@ -1244,6 +1242,8 @@ static int zynqmp_firmware_probe(struct platform_device *pdev)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
zynqmp_pm_api_debugfs_init();
|
||||||
|
|
||||||
return of_platform_populate(dev->of_node, NULL, NULL, dev);
|
return of_platform_populate(dev->of_node, NULL, NULL, dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user