hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c
....@@ -1,21 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /* Applied Micro X-Gene SoC Ethernet Driver
23 *
34 * Copyright (c) 2014, Applied Micro Circuits Corporation
45 * Authors: Iyappan Subramanian <isubramanian@apm.com>
56 * Keyur Chudgar <kchudgar@apm.com>
6
- *
7
- * This program is free software; you can redistribute it and/or modify it
8
- * under the terms of the GNU General Public License as published by the
9
- * Free Software Foundation; either version 2 of the License, or (at your
10
- * option) any later version.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU General Public License
18
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
197 */
208
219 #include "xgene_enet_main.h"
....@@ -472,12 +460,14 @@
472460 }
473461 } else {
474462 #ifdef CONFIG_ACPI
475
- if (acpi_has_method(ACPI_HANDLE(&p->pdev->dev), "_RST"))
476
- acpi_evaluate_object(ACPI_HANDLE(&p->pdev->dev),
477
- "_RST", NULL, NULL);
478
- else if (acpi_has_method(ACPI_HANDLE(&p->pdev->dev), "_INI"))
463
+ acpi_status status;
464
+
465
+ status = acpi_evaluate_object(ACPI_HANDLE(&p->pdev->dev),
466
+ "_RST", NULL, NULL);
467
+ if (ACPI_FAILURE(status)) {
479468 acpi_evaluate_object(ACPI_HANDLE(&p->pdev->dev),
480469 "_INI", NULL, NULL);
470
+ }
481471 #endif
482472 }
483473