struct regmap_mmio_context *ctx = context;
        u32 offset;
 
-       if (reg_size != 4)
-               return -EIO;
+       BUG_ON(reg_size != 4);
+
        if (val_size % ctx->val_bytes)
                return -EIO;
 
 #endif
                default:
                        /* Should be caught by regmap_mmio_check_config */
-                       return -EIO;
+                       BUG();
                }
                val_size -= ctx->val_bytes;
                val += ctx->val_bytes;
 
 static int regmap_mmio_write(void *context, const void *data, size_t count)
 {
-       if (count < 4)
-               return -EIO;
+       BUG_ON(count < 4);
+
        return regmap_mmio_gather_write(context, data, 4, data + 4, count - 4);
 }
 
        struct regmap_mmio_context *ctx = context;
        u32 offset;
 
-       if (reg_size != 4)
-               return -EIO;
+       BUG_ON(reg_size != 4);
+
        if (val_size % ctx->val_bytes)
                return -EIO;
 
 #endif
                default:
                        /* Should be caught by regmap_mmio_check_config */
-                       return -EIO;
+                       BUG();
                }
                val_size -= ctx->val_bytes;
                val += ctx->val_bytes;