Skip to content

Commit

Permalink
ACPI: platform: Get rid of redundant 'else'
Browse files Browse the repository at this point in the history
In the snippets like the following

	if (...)
		return / goto / break / continue ...;
	else
		...

the 'else' is redundant. Get rid of it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Andy Shevchenko authored and Rafael J. Wysocki committed Sep 3, 2022
1 parent b90cb10 commit f3bc9ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/acpi/acpi_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev,

INIT_LIST_HEAD(&resource_list);
count = acpi_dev_get_resources(adev, &resource_list, NULL, NULL);
if (count < 0) {
if (count < 0)
return NULL;
} else if (count > 0) {
if (count > 0) {
resources = kcalloc(count, sizeof(struct resource),
GFP_KERNEL);
if (!resources) {
Expand Down

0 comments on commit f3bc9ca

Please sign in to comment.