platform/chrome: cros_ec: remove unneeded label and if-condition
authorTzung-Bi Shih <tzungbi@kernel.org>
Wed, 8 Mar 2023 03:12:47 +0000 (11:12 +0800)
committerTzung-Bi Shih <tzungbi@kernel.org>
Mon, 24 Apr 2023 05:35:11 +0000 (13:35 +0800)
commit554ec02c97254962bbb0a8776c3160d294fc7e51
tree2a8d5b0df4f8074d7d4f6f797053603e23e7b534
parent32d2a15ec54a3d8b708b343e50072ccb0e5da83f
platform/chrome: cros_ec: remove unneeded label and if-condition

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
drivers/platform/chrome/cros_ec.c