public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/4] ACPI: platform: Get rid of redundant 'else'
@ 2022-08-29 14:10 Andy Shevchenko
  2022-08-29 14:10 ` [PATCH v1 2/4] ACPI: platform: Remove redundant print on ENOMEM Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Andy Shevchenko @ 2022-08-29 14:10 UTC (permalink / raw)
  To: Andy Shevchenko, linux-acpi, linux-kernel; +Cc: Rafael J. Wysocki, Len Brown

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>
---
 drivers/acpi/acpi_platform.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/acpi_platform.c b/drivers/acpi/acpi_platform.c
index 1a1c78b23fba..75e26528056d 100644
--- a/drivers/acpi/acpi_platform.c
+++ b/drivers/acpi/acpi_platform.c
@@ -114,9 +114,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) {
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-08-29 15:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-29 14:10 [PATCH v1 1/4] ACPI: platform: Get rid of redundant 'else' Andy Shevchenko
2022-08-29 14:10 ` [PATCH v1 2/4] ACPI: platform: Remove redundant print on ENOMEM Andy Shevchenko
2022-08-29 14:10 ` [PATCH v1 3/4] ACPI: platform: Use sizeof(*pointer) instead of sizeof(type) Andy Shevchenko
2022-08-29 14:11 ` [PATCH v1 4/4] ACPI: platform: Keep list of ACPI IDs sorted Andy Shevchenko
2022-08-29 14:28   ` Rafael J. Wysocki
2022-08-29 15:18     ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox