@@ -1730,10 +1730,10 @@ static const struct acpi_device_id ec_device_ids[] = {
1730
1730
* namespace EC before the main ACPI device enumeration process. It is
1731
1731
* retained for historical reason and will be deprecated in the future.
1732
1732
*/
1733
- int __init acpi_ec_dsdt_probe (void )
1733
+ void __init acpi_ec_dsdt_probe (void )
1734
1734
{
1735
- acpi_status status ;
1736
1735
struct acpi_ec * ec ;
1736
+ acpi_status status ;
1737
1737
int ret ;
1738
1738
1739
1739
/*
@@ -1743,21 +1743,22 @@ int __init acpi_ec_dsdt_probe(void)
1743
1743
* picking up an invalid EC device.
1744
1744
*/
1745
1745
if (boot_ec )
1746
- return - ENODEV ;
1746
+ return ;
1747
1747
1748
1748
ec = acpi_ec_alloc ();
1749
1749
if (!ec )
1750
- return - ENOMEM ;
1750
+ return ;
1751
+
1751
1752
/*
1752
1753
* At this point, the namespace is initialized, so start to find
1753
1754
* the namespace objects.
1754
1755
*/
1755
- status = acpi_get_devices (ec_device_ids [0 ].id ,
1756
- ec_parse_device , ec , NULL );
1756
+ status = acpi_get_devices (ec_device_ids [0 ].id , ec_parse_device , ec , NULL );
1757
1757
if (ACPI_FAILURE (status ) || !ec -> handle ) {
1758
- ret = - ENODEV ;
1759
- goto error ;
1758
+ acpi_ec_free ( ec ) ;
1759
+ return ;
1760
1760
}
1761
+
1761
1762
/*
1762
1763
* When the DSDT EC is available, always re-configure boot EC to
1763
1764
* have _REG evaluated. _REG can only be evaluated after the
@@ -1766,10 +1767,8 @@ int __init acpi_ec_dsdt_probe(void)
1766
1767
* handle the events.
1767
1768
*/
1768
1769
ret = acpi_config_boot_ec (ec , ec -> handle , false, false);
1769
- error :
1770
1770
if (ret )
1771
1771
acpi_ec_free (ec );
1772
- return ret ;
1773
1772
}
1774
1773
1775
1774
/*
@@ -1872,36 +1871,32 @@ static const struct dmi_system_id ec_dmi_table[] __initconst = {
1872
1871
{},
1873
1872
};
1874
1873
1875
- int __init acpi_ec_ecdt_probe (void )
1874
+ void __init acpi_ec_ecdt_probe (void )
1876
1875
{
1877
- int ret ;
1878
- acpi_status status ;
1879
1876
struct acpi_table_ecdt * ecdt_ptr ;
1880
1877
struct acpi_ec * ec ;
1878
+ acpi_status status ;
1879
+ int ret ;
1881
1880
1882
- ec = acpi_ec_alloc ();
1883
- if (!ec )
1884
- return - ENOMEM ;
1885
- /*
1886
- * Generate a boot ec context
1887
- */
1881
+ /* Generate a boot ec context. */
1888
1882
dmi_check_system (ec_dmi_table );
1889
1883
status = acpi_get_table (ACPI_SIG_ECDT , 1 ,
1890
1884
(struct acpi_table_header * * )& ecdt_ptr );
1891
- if (ACPI_FAILURE (status )) {
1892
- ret = - ENODEV ;
1893
- goto error ;
1894
- }
1885
+ if (ACPI_FAILURE (status ))
1886
+ return ;
1895
1887
1896
1888
if (!ecdt_ptr -> control .address || !ecdt_ptr -> data .address ) {
1897
1889
/*
1898
1890
* Asus X50GL:
1899
1891
* https://bugzilla.kernel.org/show_bug.cgi?id=11880
1900
1892
*/
1901
- ret = - ENODEV ;
1902
- goto error ;
1893
+ return ;
1903
1894
}
1904
1895
1896
+ ec = acpi_ec_alloc ();
1897
+ if (!ec )
1898
+ return ;
1899
+
1905
1900
if (EC_FLAGS_CORRECT_ECDT ) {
1906
1901
ec -> command_addr = ecdt_ptr -> data .address ;
1907
1902
ec -> data_addr = ecdt_ptr -> control .address ;
@@ -1916,10 +1911,8 @@ int __init acpi_ec_ecdt_probe(void)
1916
1911
* the namespace objects, or handle the events.
1917
1912
*/
1918
1913
ret = acpi_config_boot_ec (ec , ACPI_ROOT_OBJECT , false, true);
1919
- error :
1920
1914
if (ret )
1921
1915
acpi_ec_free (ec );
1922
- return ret ;
1923
1916
}
1924
1917
1925
1918
#ifdef CONFIG_PM_SLEEP
0 commit comments