]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
platform/chrome: chromeos_laptop: Remove duplicate check
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 30 Jun 2025 10:12:25 +0000 (13:12 +0300)
committerTzung-Bi Shih <tzungbi@kernel.org>
Tue, 1 Jul 2025 07:09:06 +0000 (07:09 +0000)
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>
drivers/platform/chrome/chromeos_laptop.c

index 3ab668764383f57d12941930ca7107bd065bd4f6..3579c42b515ef19e0b4119205d8f73fdb39a750d 100644 (file)
@@ -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;