summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-02-01 16:04:50 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-02-01 16:04:50 +0300
commit81219f80097ea7616211dddca5438283a05816d4 (patch)
treeaf60a87e8bec302088125fc4c9a0e46bc4add4e2 /drivers
parent3e1f4a2e1184ae6ad7f4caf682ced9554141a0f4 (diff)
parent4d395c5e74398f664405819330e5a298da37f655 (diff)
downloadlinux-81219f80097ea7616211dddca5438283a05816d4.tar.xz
Merge tag 'thunderbolt-for-v5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus
Mika writes: thunderbolt: Fix for v5.11-rc7 A single fix for a possible NULL pointer dereference when adding device links from ACPI description. * tag 'thunderbolt-for-v5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Fix possible NULL pointer dereference in tb_acpi_add_link()
Diffstat (limited to 'drivers')
-rw-r--r--drivers/thunderbolt/acpi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thunderbolt/acpi.c b/drivers/thunderbolt/acpi.c
index a5f988a9f948..b5442f979b4d 100644
--- a/drivers/thunderbolt/acpi.c
+++ b/drivers/thunderbolt/acpi.c
@@ -56,7 +56,7 @@ static acpi_status tb_acpi_add_link(acpi_handle handle, u32 level, void *data,
* managed with the xHCI and the SuperSpeed hub so we create the
* link from xHCI instead.
*/
- while (!dev_is_pci(dev))
+ while (dev && !dev_is_pci(dev))
dev = dev->parent;
if (!dev)