summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2025-06-30 13:12:25 +0300
committerTzung-Bi Shih <tzungbi@kernel.org>2025-07-01 07:09:06 +0000
commit0c8fe93f4e7767b0e579959de051dcaddd7197fd (patch)
tree40c41cbd8e4959ac48011b6a6a3bf4304d0d61e3
parent981d7f91aeda17424b29f033249f4fa7cd2a7556 (diff)
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 <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20250630101225.1855431-1-andriy.shevchenko@linux.intel.com Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
-rw-r--r--drivers/platform/chrome/chromeos_laptop.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c
index 3ab668764383..3579c42b515e 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;