]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/chrome: cros_ec: remove unneeded label and if-condition
authorTzung-Bi Shih <tzungbi@kernel.org>
Thu, 21 Aug 2025 13:27:18 +0000 (09:27 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:26:11 +0000 (16:26 +0200)
commita8b2c86393c3f6dfca51191d80b106ce319bd668
treee60a402c02371801d7ae694987e45defcca1ec0f
parent8a394c7ed7d4d187c2f46df0e90108aa044291d5
platform/chrome: cros_ec: remove unneeded label and if-condition

[ Upstream commit 554ec02c97254962bbb0a8776c3160d294fc7e51 ]

Both `ec_dev->ec` and `ec_dev->pd` are initialized to NULL at the
beginning of cros_ec_register().  Also, platform_device_unregister()
takes care if the given platform_device is NULL.

Remove the unneeded goto-label and if-condition.

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Link: https://lore.kernel.org/r/20230308031247.2866401-1-tzungbi@kernel.org
Stable-dep-of: e23749534619 ("platform/chrome: cros_ec: Unregister notifier in cros_ec_unregister()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/chrome/cros_ec.c