summaryrefslogtreecommitdiff
path: root/io-module/mts-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io-module/mts-io.c')
-rw-r--r--io-module/mts-io.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/io-module/mts-io.c b/io-module/mts-io.c
index 7078708..6f928b5 100644
--- a/io-module/mts-io.c
+++ b/io-module/mts-io.c
@@ -959,21 +959,19 @@ static int __init mts_io_init(void)
platform_driver_unregister(&mts_io_driver);
mts_io_platform_device = platform_device_alloc(PLATFORM_NAME, -1);
- if (!mts_io_platform_device) {
- cleanup();
+ if (!mts_io_platform_device)
return -ENOMEM;
- }
/* request_firmware() requires a device, so call after device allocated */
ret = mts_id_eeprom_load();
if (ret) {
- cleanup();
+ kfree(mts_io_platform_device);
return ret;
}
ret = platform_device_add(mts_io_platform_device);
if (ret) {
- cleanup();
+ kfree(mts_io_platform_device);
return ret;
}