diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2019-08-20 17:34:40 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2019-09-04 23:11:26 +0200 |
commit | 539b7569c56523486db95214d62a108532c7960f (patch) | |
tree | b984bc79ac65f857dfa0e5e6daadbaebef30f300 /drivers/i2c | |
parent | 82d51481544146db2e9c9fb90c8fed92a5d0f93b (diff) | |
download | linux-539b7569c56523486db95214d62a108532c7960f.tar.gz linux-539b7569c56523486db95214d62a108532c7960f.tar.bz2 linux-539b7569c56523486db95214d62a108532c7960f.zip |
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: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-cht-wc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-wc.c index f6546de66fbc..b8fde61bb5d8 100644 --- a/drivers/i2c/busses/i2c-cht-wc.c +++ b/drivers/i2c/busses/i2c-cht-wc.c @@ -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); - if (adap->client) - i2c_unregister_device(adap->client); + i2c_unregister_device(adap->client); i2c_del_adapter(&adap->adapter); irq_domain_remove(adap->irq_domain); |