OSDN Git Service

drivers: ipmi: Drop device reference
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Mon, 3 Jun 2019 15:49:28 +0000 (16:49 +0100)
committerCorey Minyard <cminyard@mvista.com>
Mon, 3 Jun 2019 20:02:11 +0000 (15:02 -0500)
Drop the reference to a device found via bus_find_device()

Cc: Corey Minyard <minyard@acm.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
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 <cminyard@mvista.com>
drivers/char/ipmi/ipmi_si_platform.c

index 0cd8496..5c51f52 100644 (file)
@@ -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);
        }
 }