[PATCH 09/38] arm: mach-imx: add missing put_device calls
From: Levente Kurusa
Date: Thu Dec 19 2013 - 10:04:34 EST
This is required so that we give up the last reference to the device.
Signed-off-by: Levente Kurusa <levex@xxxxxxxxx>
---
arch/arm/mach-imx/devices/devices.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-imx/devices/devices.c b/arch/arm/mach-imx/devices/devices.c
index 1b4366a..0b17c89 100644
--- a/arch/arm/mach-imx/devices/devices.c
+++ b/arch/arm/mach-imx/devices/devices.c
@@ -37,11 +37,14 @@ int __init mxc_device_init(void)
int ret;
ret = device_register(&mxc_aips_bus);
- if (ret < 0)
+ if (ret < 0) {
+ put_device(&mxc_aips_bus);
goto done;
+ }
ret = device_register(&mxc_ahb_bus);
-
+ if(ret < 0)
+ put_device(&mxc_ahb_bus);
done:
return ret;
}
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/