aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorGravatar Wolfram Sang <wsa+renesas@sang-engineering.com> 2019-08-20 17:34:43 +0200
committerGravatar Lee Jones <lee.jones@linaro.org> 2019-09-02 11:09:03 +0100
commit1094422253db01ac3a12bde010c75e5135021d2d (patch)
treed7a354519ebcd66f38ebded03fb693e7778293e1 /drivers/mfd
parentmfd: sm501: Include the GPIO driver header (diff)
downloadlinux-1094422253db01ac3a12bde010c75e5135021d2d.tar.gz
linux-1094422253db01ac3a12bde010c75e5135021d2d.tar.bz2
linux-1094422253db01ac3a12bde010c75e5135021d2d.zip
mfd: htc-i2cpld: 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> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/htc-i2cpld.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mfd/htc-i2cpld.c b/drivers/mfd/htc-i2cpld.c
index 370519af5d0b..8ad6768bd7a2 100644
--- a/drivers/mfd/htc-i2cpld.c
+++ b/drivers/mfd/htc-i2cpld.c
@@ -385,8 +385,7 @@ static void htcpld_unregister_chip_i2c(
htcpld = platform_get_drvdata(pdev);
chip = &htcpld->chip[chip_index];
- if (chip->client)
- i2c_unregister_device(chip->client);
+ i2c_unregister_device(chip->client);
}
static int htcpld_register_chip_gpio(