Commit cc07fc80 authored by Wolfram Sang's avatar Wolfram Sang Committed by Greg Kroah-Hartman

usb: typec: drop check because i2c_unregister_device() is NULL safe

No need to check the argument of i2c_unregister_device() because the
function itself does it.
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Acked-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20230922080421.35145-2-wsa+renesas@sang-engineering.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f782152b
...@@ -1550,8 +1550,7 @@ static void anx7411_i2c_remove(struct i2c_client *client) ...@@ -1550,8 +1550,7 @@ static void anx7411_i2c_remove(struct i2c_client *client)
if (plat->workqueue) if (plat->workqueue)
destroy_workqueue(plat->workqueue); destroy_workqueue(plat->workqueue);
if (plat->spi_client) i2c_unregister_device(plat->spi_client);
i2c_unregister_device(plat->spi_client);
if (plat->typec.role_sw) if (plat->typec.role_sw)
usb_role_switch_put(plat->typec.role_sw); usb_role_switch_put(plat->typec.role_sw);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment