mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
pmdomain core:
- Fix error checking in genpd_dev_pm_attach_by_id() pmdomain providers: - renesas: Remove obsolete nullify checks for rcar domains -----BEGIN PGP SIGNATURE----- iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAmgvpq0XHHVsZi5oYW5z c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjCndvA/9G4/jNNxG/29weyTyXs1JthX/ oUBvQmpT3pid2vbCF40lSKglrv7I0EwzAgToHUPFzUIVX+lrt12GVf+Vbb2IbIsK 5PxXYu1uV+diBuOotXs+46a8BlJQ1MVhzwK8b8hs0IDBOsmiq+i7FE5wQ9wi8Sow FrXf5BG627VDOTXr1fj0R5i5lno5rU4DPvUCokPFklM0aoSnF/QYodsHgwAOkuo8 6NYmnEJaQqd0BVvOBOD8no+xs5HZ3fw9K5v2/Oe+Voe/UWgc4Sf3dh3NjKlCloXo 0CccyJv2p7ou8dtQyVQ7q38hZZHgnZzygY75KL8jqcm8jTlreaw7iYN1U+NE/Oy3 AhSp54QuZczjbBEntyappabZClPGG2Vyl2mWCungx2K9tHqizAwQKHH52t0nzG6V umch63PQPO7AFJHIs3rJRbk4EaLJvQ69VAbmrzOizr/Yz11ej4jLkbiX5J/3ivRN e2isPp6058B1Ov5Y51JE1IxZT2zaNFIha3W1pjn4Ad9V5sigQc5GdjVWkqlJQ7lu 6YOSV23ptEyGysXCRQN5Ahhku1sadqY4Fncahq7xy/OaTb2fMGXSqesceQxAD9Cf RQU9S17sTwxp40PHKo8YPnz1rXhzppR+JpLAZ3nYRcidInXzUYrpy/d9LbdCJYdq E7gkJrz5Hv1g8Wc7sK8= =ruAb -----END PGP SIGNATURE----- Merge tag 'pmdomain-v6.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm Pull pmdomain fixes from Ulf Hansson: "Core: - Fix error checking in genpd_dev_pm_attach_by_id() Providers: - renesas: Remove obsolete nullify checks for rcar domains" * tag 'pmdomain-v6.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm: pmdomain: core: Fix error checking in genpd_dev_pm_attach_by_id() pmdomain: renesas: rcar: Remove obsolete nullify checks
This commit is contained in:
commit
94305e83ec
|
|
@ -3126,7 +3126,7 @@ struct device *genpd_dev_pm_attach_by_id(struct device *dev,
|
|||
/* Verify that the index is within a valid range. */
|
||||
num_domains = of_count_phandle_with_args(dev->of_node, "power-domains",
|
||||
"#power-domain-cells");
|
||||
if (index >= num_domains)
|
||||
if (num_domains < 0 || index >= num_domains)
|
||||
return NULL;
|
||||
|
||||
/* Allocate and register device on the genpd bus. */
|
||||
|
|
|
|||
|
|
@ -338,11 +338,6 @@ static int __init rcar_gen4_sysc_pd_init(void)
|
|||
struct rcar_gen4_sysc_pd *pd;
|
||||
size_t n;
|
||||
|
||||
if (!area->name) {
|
||||
/* Skip NULLified area */
|
||||
continue;
|
||||
}
|
||||
|
||||
n = strlen(area->name) + 1;
|
||||
pd = kzalloc(sizeof(*pd) + n, GFP_KERNEL);
|
||||
if (!pd) {
|
||||
|
|
|
|||
|
|
@ -396,11 +396,6 @@ static int __init rcar_sysc_pd_init(void)
|
|||
struct rcar_sysc_pd *pd;
|
||||
size_t n;
|
||||
|
||||
if (!area->name) {
|
||||
/* Skip NULLified area */
|
||||
continue;
|
||||
}
|
||||
|
||||
n = strlen(area->name) + 1;
|
||||
pd = kzalloc(sizeof(*pd) + n, GFP_KERNEL);
|
||||
if (!pd) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user