Skip to content
Commit 444ac384 authored by Mika Westerberg's avatar Mika Westerberg
Browse files

thunderbolt: Make tb_switch_alloc() return ERR_PTR()



In order to detect possible connections to other domains we need to be
able to find out why tb_switch_alloc() fails so make it return ERR_PTR()
instead. This allows the caller to differentiate between errors such as
-ENOMEM which comes from the kernel and for instance -EIO which comes
from the hardware when trying to access the possible switch.

Convert all the current call sites to handle this properly.

Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
parent 44242d6c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment