Commit ea63a26e authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Corey Minyard

ipmi_si: Remove bogus err_free label

There is no more 'free' in the error path, so drop the label and
return errors inline.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Message-Id: <20210402174334.13466-3-andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
parent 079dea00
...@@ -316,7 +316,6 @@ static int acpi_ipmi_probe(struct platform_device *pdev) ...@@ -316,7 +316,6 @@ static int acpi_ipmi_probe(struct platform_device *pdev)
acpi_status status; acpi_status status;
unsigned long long tmp; unsigned long long tmp;
struct resource *res; struct resource *res;
int rv = -EINVAL;
if (!si_tryacpi) if (!si_tryacpi)
return -ENODEV; return -ENODEV;
...@@ -336,7 +335,7 @@ static int acpi_ipmi_probe(struct platform_device *pdev) ...@@ -336,7 +335,7 @@ static int acpi_ipmi_probe(struct platform_device *pdev)
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"Could not find ACPI IPMI interface type\n"); "Could not find ACPI IPMI interface type\n");
goto err_free; return -EINVAL;
} }
switch (tmp) { switch (tmp) {
...@@ -350,21 +349,18 @@ static int acpi_ipmi_probe(struct platform_device *pdev) ...@@ -350,21 +349,18 @@ static int acpi_ipmi_probe(struct platform_device *pdev)
io.si_type = SI_BT; io.si_type = SI_BT;
break; break;
case 4: /* SSIF, just ignore */ case 4: /* SSIF, just ignore */
rv = -ENODEV; return -ENODEV;
goto err_free;
default: default:
dev_info(&pdev->dev, "unknown IPMI type %lld\n", tmp); dev_info(&pdev->dev, "unknown IPMI type %lld\n", tmp);
goto err_free; return -EINVAL;
} }
io.regsize = DEFAULT_REGSIZE; io.regsize = DEFAULT_REGSIZE;
io.regshift = 0; io.regshift = 0;
res = ipmi_get_info_from_resources(pdev, &io); res = ipmi_get_info_from_resources(pdev, &io);
if (!res) { if (!res)
rv = -EINVAL; return -EINVAL;
goto err_free;
}
/* If _GPE exists, use it; otherwise use standard interrupts */ /* If _GPE exists, use it; otherwise use standard interrupts */
status = acpi_evaluate_integer(handle, "_GPE", NULL, &tmp); status = acpi_evaluate_integer(handle, "_GPE", NULL, &tmp);
...@@ -390,9 +386,6 @@ static int acpi_ipmi_probe(struct platform_device *pdev) ...@@ -390,9 +386,6 @@ static int acpi_ipmi_probe(struct platform_device *pdev)
request_module("acpi_ipmi"); request_module("acpi_ipmi");
return ipmi_si_add_smi(&io); return ipmi_si_add_smi(&io);
err_free:
return rv;
} }
static const struct acpi_device_id acpi_ipmi_match[] = { static const struct acpi_device_id acpi_ipmi_match[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment