|
@@ -1185,6 +1185,7 @@ static int pm860x_probe(struct i2c_client *client,
|
|
|
ret = PTR_ERR(chip->regmap_companion);
|
|
|
dev_err(&chip->companion->dev,
|
|
|
"Failed to allocate register map: %d\n", ret);
|
|
|
+ i2c_unregister_device(chip->companion);
|
|
|
return ret;
|
|
|
}
|
|
|
i2c_set_clientdata(chip->companion, chip);
|