If driver_override was set when a device was released the string would
not be kfree'ed in amba_device_release and thus leaked when the amba
device was freed.

Cc: Russell King <[email protected]>
Cc: Todd Kjos <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Trent Piepho <[email protected]>
---
 drivers/amba/bus.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index 41b706403ef7..ff3cb96526bc 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -347,6 +347,7 @@ static void amba_device_release(struct device *dev)
 
        if (d->res.parent)
                release_resource(&d->res);
+       kfree(d->driver_override);
        kfree(d);
 }
 
-- 
2.14.4

Reply via email to