Skip to contentSkip to conversation

platform/chrome: chromeos_laptop - Remove duplicate check

PATCH In review Andy Shevchenko 2 participants 2 messages Jun 30, 2025 – Jul 1, 2025

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

PATCH 1/1 platform/chrome: chromeos_laptop - Remove duplicate check

fwnode_remove_software_node() is aware of invalid input, no need to perform checks in the caller.

---
 drivers/platform/chrome/chromeos_laptop.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/platform/chrome/chromeos_laptop.c +1 -2
index 69d366df3e26..dbf256071549 100644
@@ -780,8 +780,7 @@ chromeos_laptop_prepare_i2c_peripherals(struct chromeos_laptop *cros_laptop,
 	while (--i >= 0) {
 		i2c_dev = &i2c_peripherals[i];
 		info = &i2c_dev->board_info;
-		if (!IS_ERR_OR_NULL(info->fwnode))
-			fwnode_remove_software_node(info->fwnode);
+		fwnode_remove_software_node(info->fwnode);
 	}
 	kfree(i2c_peripherals);
 	return error;
Signature · 1 line
2.47.2