if ((buffer->cmd_class == CLASS_TOKEN_READ ||
             buffer->cmd_class == CLASS_TOKEN_WRITE) &&
             buffer->cmd_select < 3) {
+               /* tokens enabled ? */
+               if (!da_tokens) {
+                       dev_dbg(d, "no token support on this system\n");
+                       return -EINVAL;
+               }
+
                /* find the matching token ID */
                for (i = 0; i < da_num_tokens; i++) {
                        if (da_tokens[i].location != buffer->input[0])
 {
        int i;
 
+       if (!da_tokens)
+               return NULL;
+
        for (i = 0; i < da_num_tokens; i++) {
                if (da_tokens[i].tokenID == tokenid)
                        return &da_tokens[i];
 
        dmi_walk(find_tokens, NULL);
 
-       if (!da_tokens)  {
-               pr_info("Unable to find dmi tokens\n");
-               return -ENODEV;
-       }
-
        ret = platform_driver_register(&platform_driver);
        if (ret)
                goto fail_platform_driver;
        if (ret)
                goto fail_platform_device_add;
 
-       /* duplicate tokens will cause problems building sysfs files */
-       zero_duplicates(&platform_device->dev);
-
-       ret = build_tokens_sysfs(platform_device);
-       if (ret)
-               goto fail_create_group;
-
        /* register backends */
        wmi = init_dell_smbios_wmi();
        if (wmi)
        if (wmi && smm) {
                pr_err("No SMBIOS backends available (wmi: %d, smm: %d)\n",
                        wmi, smm);
-               goto fail_sysfs;
+               goto fail_create_group;
+       }
+
+       if (da_tokens)  {
+               /* duplicate tokens will cause problems building sysfs files */
+               zero_duplicates(&platform_device->dev);
+
+               ret = build_tokens_sysfs(platform_device);
+               if (ret)
+                       goto fail_sysfs;
        }
 
        return 0;
        exit_dell_smbios_smm();
        mutex_lock(&smbios_mutex);
        if (platform_device) {
-               free_group(platform_device);
+               if (da_tokens)
+                       free_group(platform_device);
                platform_device_unregister(platform_device);
                platform_driver_unregister(&platform_driver);
        }