mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
thunderbolt: Add some more descriptive probe error messages
Currently there's a lot of silent error-return paths in various places where nhi_probe() can fail. Sprinkle some prints to make it clearer where the problem is. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
This commit is contained in:
parent
dd60fb487e
commit
15bcac35ba
|
|
@ -1223,7 +1223,7 @@ int nhi_probe(struct tb_nhi *nhi)
|
|||
if (nhi->ops->init) {
|
||||
res = nhi->ops->init(nhi);
|
||||
if (res)
|
||||
return res;
|
||||
return dev_err_probe(dev, res, "NHI specific init failed\n");
|
||||
}
|
||||
|
||||
tb = nhi_select_cm(nhi);
|
||||
|
|
@ -1244,7 +1244,7 @@ int nhi_probe(struct tb_nhi *nhi)
|
|||
tb_domain_put(tb);
|
||||
wait_for_completion(&nhi->domain_released);
|
||||
nhi_shutdown(nhi);
|
||||
return res;
|
||||
return dev_err_probe(dev, res, "failed to add domain\n");
|
||||
}
|
||||
dev_set_drvdata(dev, tb);
|
||||
|
||||
|
|
|
|||
|
|
@ -3000,7 +3000,8 @@ static int tb_start(struct tb *tb, bool reset)
|
|||
|
||||
tb->root_switch = tb_switch_alloc(tb, &tb->dev, 0);
|
||||
if (IS_ERR(tb->root_switch))
|
||||
return PTR_ERR(tb->root_switch);
|
||||
return dev_err_probe(tb->nhi->dev, PTR_ERR(tb->root_switch),
|
||||
"failed to allocate host router\n");
|
||||
|
||||
/*
|
||||
* ICM firmware upgrade needs running firmware and in native
|
||||
|
|
@ -3017,14 +3018,14 @@ static int tb_start(struct tb *tb, bool reset)
|
|||
ret = tb_switch_configure(tb->root_switch);
|
||||
if (ret) {
|
||||
tb_switch_put(tb->root_switch);
|
||||
return ret;
|
||||
return dev_err_probe(tb->nhi->dev, ret, "failed to configure host router\n");
|
||||
}
|
||||
|
||||
/* Announce the switch to the world */
|
||||
ret = tb_switch_add(tb->root_switch);
|
||||
if (ret) {
|
||||
tb_switch_put(tb->root_switch);
|
||||
return ret;
|
||||
return dev_err_probe(tb->nhi->dev, ret, "failed to add host router\n");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user