mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-20 11:34:02 +08:00
Samsung soc drivers changes for v5.4, part 2
Fixes and cleanups for recently introduced Exynos chipid driver. -----BEGIN PGP SIGNATURE----- iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAl1v9IkQHGtyemtAa2Vy bmVsLm9yZwAKCRDBN2bmhouD1xiJD/4zGmpm4PgXLqcU3WAd/ltCVM3BfAWErJys ERt8poyXsSFBfBzKlHOajljlmHLzRNS4PxMCUzoJXJnyWxX8GGTkyBPnOYUGkNpB ukmjJlIBtP89HfnpmMBaBGyJ19X5+vWxF0nUWyIc+c958jZS4dYCxpHpKFgI5Ie5 sEiqSIY0WzjOothIPcGfWsPpu/t8QLZ7Z1baSoKCLTa7qN+Ai5R/niXNFCl6F3mv swaRyMofT5cp06jaWLdwYA/fjQZxT1tReZxhrAJqJkBLuEGi/2RRW8vI6fohyMH8 ZDuxNdZVY9iW8iSFyOSez42MPjEeQjSU71qtYzjNhGaMWO06teezZIEFk11PnoGX cAJw4Ql2N9EgNNRbEN2TCxkRqTrGe9IhmQeOPuWKP2RRXlLxbRi/Q9lSoiU1Kww8 dWg63YEZsV0XjhJF4iA2Rem6Xyvc/Cp8W07Cd9/uxkbPbEu5mIEypeYbnSnetqAZ UnEtPMBj4PpgWZDnyAjLK8Qt4v1G7C8LahySbAmi0jD7N+9B8DQ20E2fiMHY8CSr pYxoRwRmsc/C94U6mQlLaXiC5YiBdaHtFPvCsGZwOu6tD7p9M3ej05j3Db9OQlIa xlzUGdXm/9GAJls2d21jDevhETWp8eMao5tt2JrYRBgRPPgicCr0lunsnDMyz64r 8UsMERCdkQ== =p4js -----END PGP SIGNATURE----- Merge tag 'samsung-drivers-5.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/drivers Samsung soc drivers changes for v5.4, part 2 Fixes and cleanups for recently introduced Exynos chipid driver. * tag 'samsung-drivers-5.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: soc: samsung: chipid: Select missing dependency for EXYNOS_CHIPID soc: samsung: chipid: Remove the regmap lookup error log soc: samsung: chipid: Fix memory leak in error path Link: https://lore.kernel.org/r/20190904175002.10487-3-krzk@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
b8580b2831
@ -10,6 +10,7 @@ if SOC_SAMSUNG
|
||||
config EXYNOS_CHIPID
|
||||
bool "Exynos Chipid controller driver" if COMPILE_TEST
|
||||
depends on ARCH_EXYNOS || COMPILE_TEST
|
||||
select MFD_SYSCON
|
||||
select SOC_BUS
|
||||
|
||||
config EXYNOS_PMU
|
||||
|
@ -56,10 +56,8 @@ int __init exynos_chipid_early_init(void)
|
||||
int ret;
|
||||
|
||||
regmap = syscon_regmap_lookup_by_compatible("samsung,exynos4210-chipid");
|
||||
if (IS_ERR(regmap)) {
|
||||
pr_err("Failed to get CHIPID regmap\n");
|
||||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
}
|
||||
|
||||
ret = regmap_read(regmap, EXYNOS_CHIPID_REG_PRO_ID, &product_id);
|
||||
if (ret < 0)
|
||||
@ -81,15 +79,15 @@ int __init exynos_chipid_early_init(void)
|
||||
soc_dev_attr->soc_id = product_id_to_soc_id(product_id);
|
||||
if (!soc_dev_attr->soc_id) {
|
||||
pr_err("Unknown SoC\n");
|
||||
return -ENODEV;
|
||||
ret = -ENODEV;
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* please note that the actual registration will be deferred */
|
||||
soc_dev = soc_device_register(soc_dev_attr);
|
||||
if (IS_ERR(soc_dev)) {
|
||||
kfree(soc_dev_attr->revision);
|
||||
kfree(soc_dev_attr);
|
||||
return PTR_ERR(soc_dev);
|
||||
ret = PTR_ERR(soc_dev);
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* it is too early to use dev_info() here (soc_dev is NULL) */
|
||||
@ -97,5 +95,11 @@ int __init exynos_chipid_early_init(void)
|
||||
soc_dev_attr->soc_id, product_id, revision);
|
||||
|
||||
return 0;
|
||||
|
||||
err:
|
||||
kfree(soc_dev_attr->revision);
|
||||
kfree(soc_dev_attr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
early_initcall(exynos_chipid_early_init);
|
||||
|
Loading…
Reference in New Issue
Block a user