提交 b683a0a6 编写于 作者: A Axel Lin 提交者: Samuel Ortiz

mfd: Return proper error if tps65090 regmap_init_i2c fails

Return proper error instead of 0 if regmap_init_i2c fails.
Signed-off-by: NAxel Lin <axel.lin@gmail.com>
Acked-by: NVenu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 1379f49e
......@@ -297,10 +297,10 @@ static int __devinit tps65090_i2c_probe(struct i2c_client *client,
tps65090->rmap = regmap_init_i2c(tps65090->client,
&tps65090_regmap_config);
if (IS_ERR(tps65090->rmap)) {
dev_err(&client->dev, "regmap_init failed with err: %ld\n",
PTR_ERR(tps65090->rmap));
ret = PTR_ERR(tps65090->rmap);
dev_err(&client->dev, "regmap_init failed with err: %d\n", ret);
goto err_irq_exit;
};
}
ret = mfd_add_devices(tps65090->dev, -1, tps65090s,
ARRAY_SIZE(tps65090s), NULL, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册