Skip to contentSkip to conversation

platform/x86: asus-armoury: Fix error code in mini_led_mode_current_value_store()

PATCH In review Dan Carpenter 2 participants 2 messages Nov 21, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86: asus-armoury: Fix error code in mini_led_mode_current_value_store()

There are two return statements in a row here. The first one is wrong so delete that one. This changes the return value to -ENODEV.

Fixes f99eb098090e ("platform/x86: asus-armoury: move existing tunings to asus-armoury module")
---
 drivers/platform/x86/asus-armoury.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/asus-armoury.c +1 -1
index 9f67218ecd14..a2cfaaa71f25 100644
@@ -463,7 +463,7 @@ static ssize_t mini_led_mode_current_value_store(struct kobject *kobj,
 	}
 
 	if (mode >= mini_led_mode_map_size) {
-		return pr_warn("mini-LED mode unrecognized device: %u\n", mode);
+		pr_warn("mini-LED mode unrecognized device: %u\n", mode);
 		return -ENODEV;
 	}
 
Signature · 1 line
2.51.0
maintainer
#1 lore raw
Quoted 4 lines · Dan Carpenter

There are two return statements in a row here. The first one is wrong so delete that one. This changes the return value to -ENODEV.

Thank you for your contribution, it has been applied to my local review-ilpo-next branch. Note it will show up in the public platform-drivers-x86/review-ilpo-next branch only once I've pushed my local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86: asus-armoury: Fix error code in mini_led_mode_current_value_store()

      commit: 0a69fe8f097f7410dc232259129d334518d4e8dc

--
i.