Commit 539b7569 authored by Wolfram Sang's avatar Wolfram Sang Committed by Wolfram Sang

i2c: cht-wc: 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>
Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 82d51481
...@@ -409,8 +409,7 @@ static int cht_wc_i2c_adap_i2c_remove(struct platform_device *pdev) ...@@ -409,8 +409,7 @@ static int cht_wc_i2c_adap_i2c_remove(struct platform_device *pdev)
{ {
struct cht_wc_i2c_adap *adap = platform_get_drvdata(pdev); struct cht_wc_i2c_adap *adap = platform_get_drvdata(pdev);
if (adap->client) i2c_unregister_device(adap->client);
i2c_unregister_device(adap->client);
i2c_del_adapter(&adap->adapter); i2c_del_adapter(&adap->adapter);
irq_domain_remove(adap->irq_domain); irq_domain_remove(adap->irq_domain);
......
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