1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-11 17:10:13 +00:00

pmdomain providers:

- mediatek: Fix spinlock recursion fix during probe
  - imx: Fix reference count leak during probe
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAmlY4tEXHHVsZi5oYW5z
 c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjCmMGw/+OeVTe98SuoLT01SHR46R50XN
 QCxuhVoWH0KYBI6+nmcRSKeY1jSnrBmKKX6LqMIfHXv1lXCU92dbfHuthfN3saaF
 zV0YskGlQHZ3+4B+lL3Ojf7PlRVBF28fuplGA7ci4j3P3sgAds5kly/kcsllXs2x
 IiVIyahfPwA8eu6x36aBnDs/IXn11EOdhBA4jqRy09XKgRtLG1qCDl27UmmguyB7
 GGtivGZOihXSp7BciAIFenpNElsDUdkj7ftyoVkl25Ixt+VMP8yqVCLd6S512tqg
 uqprxPJKM3nUtVV5NRYK9l7DDUxCdNWsrX9aONiUmkZLj2gzTDuz7evoV3uwajJ+
 6vzJFldv52L2pm/ENc8SUbdtvTCM7Gv8JVwmud+i8mAHVaqmOf4mAIpvlChet3RX
 2d8RsqrEPe/i8TPsgBymrkSjpBm595sM25zzZYG2+Dgx3Paid5pTEvtjvhk0JGRc
 UgKoARfHIkzWFoOdbyguvK84xpFG2hOGcc89qMAnej7pggRZmZCmFzbPDbp2+cvp
 U37lVp2C0D53yO/jHOJZ78/VZbQv2W2qgKJzL4CWN5CiaAXFnaH98tJ7Rm/bEECe
 vRG9xTgRaNhUOY6W+HHp2c8MZQNDKZ5T3uBhbzdZUN+NwzXqUdgsj19Fbh/1ZX0w
 RYSHgVXaOqhZRyXt8mM=
 =0il+
 -----END PGP SIGNATURE-----

Merge tag 'pmdomain-v6.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm

Pull pmdomain fixes from Ulf Hansson:

 - mediatek: Fix spinlock recursion fix during probe

 - imx: Fix reference count leak during probe

* tag 'pmdomain-v6.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm:
  pmdomain: imx: Fix reference count leak in imx_gpc_probe()
  pmdomain: mtk-pm-domains: Fix spinlock recursion fix in probe
This commit is contained in:
Linus Torvalds 2026-01-03 09:18:36 -08:00
commit aacb0a6d60
2 changed files with 8 additions and 18 deletions

View File

@ -402,13 +402,12 @@ clk_err:
static int imx_gpc_probe(struct platform_device *pdev)
{
const struct imx_gpc_dt_data *of_id_data = device_get_match_data(&pdev->dev);
struct device_node *pgc_node;
struct device_node *pgc_node __free(device_node)
= of_get_child_by_name(pdev->dev.of_node, "pgc");
struct regmap *regmap;
void __iomem *base;
int ret;
pgc_node = of_get_child_by_name(pdev->dev.of_node, "pgc");
/* bail out if DT too old and doesn't provide the necessary info */
if (!of_property_present(pdev->dev.of_node, "#power-domain-cells") &&
!pgc_node)

View File

@ -984,18 +984,6 @@ static void scpsys_domain_cleanup(struct scpsys *scpsys)
}
}
static struct device_node *scpsys_get_legacy_regmap(struct device_node *np, const char *pn)
{
struct device_node *local_node;
for_each_child_of_node(np, local_node) {
if (of_property_present(local_node, pn))
return local_node;
}
return NULL;
}
static int scpsys_get_bus_protection_legacy(struct device *dev, struct scpsys *scpsys)
{
const u8 bp_blocks[3] = {
@ -1017,7 +1005,8 @@ static int scpsys_get_bus_protection_legacy(struct device *dev, struct scpsys *s
* this makes it then possible to allocate the array of bus_prot
* regmaps and convert all to the new style handling.
*/
node = scpsys_get_legacy_regmap(np, "mediatek,infracfg");
of_node_get(np);
node = of_find_node_with_property(np, "mediatek,infracfg");
if (node) {
regmap[0] = syscon_regmap_lookup_by_phandle(node, "mediatek,infracfg");
of_node_put(node);
@ -1030,7 +1019,8 @@ static int scpsys_get_bus_protection_legacy(struct device *dev, struct scpsys *s
regmap[0] = NULL;
}
node = scpsys_get_legacy_regmap(np, "mediatek,smi");
of_node_get(np);
node = of_find_node_with_property(np, "mediatek,smi");
if (node) {
smi_np = of_parse_phandle(node, "mediatek,smi", 0);
of_node_put(node);
@ -1048,7 +1038,8 @@ static int scpsys_get_bus_protection_legacy(struct device *dev, struct scpsys *s
regmap[1] = NULL;
}
node = scpsys_get_legacy_regmap(np, "mediatek,infracfg-nao");
of_node_get(np);
node = of_find_node_with_property(np, "mediatek,infracfg-nao");
if (node) {
regmap[2] = syscon_regmap_lookup_by_phandle(node, "mediatek,infracfg-nao");
num_regmaps++;