From 3559c3270aa3b8ac9afa3eac25f0c4e5bfb701b4 Mon Sep 17 00:00:00 2001 From: Suzuki K Poulose Date: Mon, 3 Jun 2019 16:49:28 +0100 Subject: drivers: ipmi: Drop device reference Drop the reference to a device found via bus_find_device() Cc: Corey Minyard Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Suzuki K Poulose Message-Id: <1559577023-558-3-git-send-email-suzuki.poulose@arm.com> [Moved the put_device() to after the platform_device_unregister(), for better style.] Signed-off-by: Corey Minyard --- drivers/char/ipmi/ipmi_si_platform.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/char/ipmi/ipmi_si_platform.c') diff --git a/drivers/char/ipmi/ipmi_si_platform.c b/drivers/char/ipmi/ipmi_si_platform.c index 0cd849675d99..5c51f525b9fb 100644 --- a/drivers/char/ipmi/ipmi_si_platform.c +++ b/drivers/char/ipmi/ipmi_si_platform.c @@ -444,6 +444,7 @@ void ipmi_remove_platform_device_by_name(char *name) struct platform_device *pdev = to_platform_device(dev); platform_device_unregister(pdev); + put_device(dev); } } -- cgit v1.2.3