From 0c8fe93f4e7767b0e579959de051dcaddd7197fd Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Mon, 30 Jun 2025 13:12:25 +0300 Subject: [PATCH] platform/chrome: chromeos_laptop: Remove duplicate check fwnode_remove_software_node() is aware of invalid input, no need to perform checks in the caller. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20250630101225.1855431-1-andriy.shevchenko@linux.intel.com Signed-off-by: Tzung-Bi Shih --- drivers/platform/chrome/chromeos_laptop.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c index 3ab668764383f..3579c42b515ef 100644 --- a/drivers/platform/chrome/chromeos_laptop.c +++ b/drivers/platform/chrome/chromeos_laptop.c @@ -782,8 +782,7 @@ err_out: 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; -- 2.47.2