* [PATCH] mfd: htc-i2cpld: drop check because i2c_unregister_device() is NULL safe
@ 2019-08-20 15:34 Wolfram Sang
2019-09-02 9:06 ` Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Wolfram Sang @ 2019-08-20 15:34 UTC (permalink / raw)
To: linux-i2c; +Cc: Wolfram Sang, Lee Jones, linux-kernel
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>
---
Build tested only, buildbot is happy, too.
Please apply to your tree.
drivers/mfd/htc-i2cpld.c | 3 +--
1 file changed, 1 insertion(+), 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(
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-02 9:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-20 15:34 [PATCH] mfd: htc-i2cpld: drop check because i2c_unregister_device() is NULL safe Wolfram Sang
2019-09-02 9:06 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).