> - rt286->index_cache = rt286_index_def; > rt286->index_cache_size = INDEX_CACHE_SIZE; > + rt286->index_cache = devm_kmalloc(&i2c->dev, INDEX_CACHE_SIZE, > + GFP_KERNEL); Should be devm_kmalloc(&i2c->dev, sizeof(rt286_index_def), GFP_KERNEL);