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.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/io-module/mts-io.c b/io-module/mts-io.c
index db736f9..d65c7ea 100644
--- a/io-module/mts-io.c
+++ b/io-module/mts-io.c
@@ -1347,12 +1347,7 @@ static int __init mts_io_init(void)
log_info("init: " DRIVER_VERSION);
/* We do a platform_driver_register to do a probe
- * of device tree and set the pinctrl. We then
- * unregister to remove
- * the probe function. If we don't remove the
- * probe function, we will do a 2nd probe in
- * platform_device_add, which will result in a
- * stack trace in the log. */
+ * of device tree and set the pinctrl/gpio settings. */
ret = platform_driver_register(&mts_io_driver);
if (ret) {
printk(KERN_ERR "mts-io: probe failed: %d\n", ret);
@@ -1360,6 +1355,13 @@ static int __init mts_io_init(void)
return ret;
}
+ /* Without a platform device our EEPROM load will
+ * not work, and we cannot continue. */
+ if (mts_io_platform_device == NULL) {
+ pr_err("mts-io: probe failed, possible bad device tree\n");
+ return -ENODEV;
+ }
+
/* request_firmware() requires a device, so call after device allocated */
ret = mts_id_eeprom_load();