summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2017-11-24 15:48:25 +0100
committerMika Westerberg <mika.westerberg@linux.intel.com>2018-03-09 10:54:10 +0100
commit68a7a2ace13156b8a3d8cd6cceab6c30b52e2923 (patch)
tree4660b67ed85ebaac5f0c9cb6750d1cd4444dc4a5 /drivers/thunderbolt
parentthunderbolt: Handle connecting device in place of host properly (diff)
downloadlinux-68a7a2ace13156b8a3d8cd6cceab6c30b52e2923.tar.xz
linux-68a7a2ace13156b8a3d8cd6cceab6c30b52e2923.zip
thunderbolt: Do not overwrite error code when domain adding fails
If the Thunderbolt domain adding fails for some reason we currently always return -EIO instead of the real error code. To make debugging easier return the actual error code instead. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Diffstat (limited to 'drivers/thunderbolt')
-rw-r--r--drivers/thunderbolt/nhi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c
index 80c33c7404f5..9e58d09f6029 100644
--- a/drivers/thunderbolt/nhi.c
+++ b/drivers/thunderbolt/nhi.c
@@ -1036,7 +1036,7 @@ static int nhi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
*/
tb_domain_put(tb);
nhi_shutdown(nhi);
- return -EIO;
+ return res;
}
pci_set_drvdata(pdev, tb);