Skip to content

Commit 0c8fe93

Browse files
andy-shevTzung-Bi Shih
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tzung-Bi Shih <[email protected]>
1 parent 981d7f9 commit 0c8fe93

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/platform/chrome/chromeos_laptop.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -782,8 +782,7 @@ chromeos_laptop_prepare_i2c_peripherals(struct chromeos_laptop *cros_laptop,
782782
while (--i >= 0) {
783783
i2c_dev = &i2c_peripherals[i];
784784
info = &i2c_dev->board_info;
785-
if (!IS_ERR_OR_NULL(info->fwnode))
786-
fwnode_remove_software_node(info->fwnode);
785+
fwnode_remove_software_node(info->fwnode);
787786
}
788787
kfree(i2c_peripherals);
789788
return error;

0 commit comments

Comments
 (0)