Amlogic Drivers changes for v5.20:

- Fix refcount leak in meson-secure-pwrc.c
 - Fix refcount leak in meson_mx_socinfo_init
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmK+qqwACgkQd9zb2sjI
 SdERLRAA0CWCXOmUbHvpLZc/Pjac16sMJ5Cc7Y8Az/tf17UAAekuay6w11ZIdKWW
 XBSY7McC/+hVaJcT2QANo4Axo3Br2T80osGMEv2CdQ6X6m7fP/rAVCaq2T1CeuZS
 Vombc5tgqTdiNh3pT8sFV6dTorGe+mEUxy1p1epKIoHTm2TR9erbrCsV1yG+O83q
 yC+M89dqAtb925uAp6FbQX/e81vnbezBCdyWd3iNaseZ0pmPlOXHrTgtPmAcb2eC
 RxVOJo0Uc0SeEOd6Cq5sD92pNQ53jwJcs4KUzZZC52/Ni7TkDexcwIn7UqazFYe2
 vPPE66CgI0wWveDRPPyOVkh1QJrsk+TPDIBGLX8vxRv2VhEUykFle8tao1Tn4Cpx
 Nd0ApfuB60yEGsZnqbV1SxnJu59BbFETGKOWKcImKEnC/c1sne6DVbzkFfzUKyIr
 dIy48lIku9gQko6vk90iRzFIP0Dd2KhwJhWUbm0necakzNWBD2sB19r9dTmtfJ/Q
 SsiKo4Ts/oKAMfdttGt9iPdtfsysX8wnAuCo9UXdjPS60zuke64GEQ2ISKc/6VJN
 vny5ebNhkJbmdjqYlJZ5BzBbYTN307qSmHs8ZBhdLiSLMgfhyBtnooLyGtb+Ddb8
 P/L5g95jlpKzqaQAiMrvz2kmIjpPm2rZp9imGr7akL8sG50y1eU=
 =T3Kd
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmK/V6IACgkQmmx57+YA
 GNkBGw//WcS2pTHRjQUYg5Bcy+13dDgWq4XHwtoBuBPBg7J6CNVfbNKUqO9ukcY+
 paYroFcb+KVSP+aQqJndit4fSp+Pr4eKb5rwKnjbXg/OiJhpmiOrUb0xzoJCHIH/
 jtBJ/H7NLzY4gCGMy3bD7RyrE1J7KblenlYy8b+6c26zdGnQRI5tATTqNM3N6Y8X
 wMRphRGbdv87eZ0akGTp/lWgVlsD4LPpOGaxWpLyzRUwElDz2IE68rj5y5X14KBu
 yU2rvmx2Us3rVSKMA4xp6nlTzHkCN3Q/S8R4j2aR6DaYDpdSTmthk6Hm5/RR3il7
 xwWTQRB2U2Ap0zYDymmFd6KOnViM1sWghiQEL0celQVpkxWDKcFwbURiRLgnK+5z
 2sms67A2IcUpXNulZVoBFwwjlKlS4H4u5lW/B89Xm9lS2WYACEiPuBSixJ4C+vBY
 eYOvE2YqXQTY9Ylqv78ceAnpokcDrHPBz6ZQ8O7xWFF27yRihcoU8jS7RH2XB6DH
 zeQK6B0+btbFo9u7FTvhwFgVKkCg5z5VXjI1+nzZYyfOrApYDI7MCe3Vx2rfS/fu
 dmBZ+j/8GyDlpSYX5IWBMs3pBFEk37nHRckpLsRldKvK75wMrlMqDx9e5QaP6nTc
 2j+pjIVQt+PwdmQSt/bcTZOoO8AxYAE0q+a8pHFHgW9oHJs3Vuc=
 =KaI8
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-drivers-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/drivers

Amlogic Drivers changes for v5.20:
- Fix refcount leak in meson-secure-pwrc.c
- Fix refcount leak in meson_mx_socinfo_init

* tag 'amlogic-drivers-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux:
  soc: amlogic: Fix refcount leak in meson-secure-pwrc.c
  meson-mx-socinfo: Fix refcount leak in meson_mx_socinfo_init

Link: https://lore.kernel.org/r/0c01e173-9abf-69ac-7882-e6ecc3935c33@baylibre.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2022-07-01 22:22:56 +02:00
commit aa61fa3e36
2 changed files with 4 additions and 1 deletions

View File

@ -126,6 +126,7 @@ static int __init meson_mx_socinfo_init(void)
np = of_find_matching_node(NULL, meson_mx_socinfo_analog_top_ids); np = of_find_matching_node(NULL, meson_mx_socinfo_analog_top_ids);
if (np) { if (np) {
analog_top_regmap = syscon_node_to_regmap(np); analog_top_regmap = syscon_node_to_regmap(np);
of_node_put(np);
if (IS_ERR(analog_top_regmap)) if (IS_ERR(analog_top_regmap))
return PTR_ERR(analog_top_regmap); return PTR_ERR(analog_top_regmap);

View File

@ -152,8 +152,10 @@ static int meson_secure_pwrc_probe(struct platform_device *pdev)
} }
pwrc = devm_kzalloc(&pdev->dev, sizeof(*pwrc), GFP_KERNEL); pwrc = devm_kzalloc(&pdev->dev, sizeof(*pwrc), GFP_KERNEL);
if (!pwrc) if (!pwrc) {
of_node_put(sm_np);
return -ENOMEM; return -ENOMEM;
}
pwrc->fw = meson_sm_get(sm_np); pwrc->fw = meson_sm_get(sm_np);
of_node_put(sm_np); of_node_put(sm_np);