summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-02-01 14:04:50 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-02-01 14:04:50 +0100
commit81219f80097ea7616211dddca5438283a05816d4 (patch)
treeaf60a87e8bec302088125fc4c9a0e46bc4add4e2 /drivers
parentUSB: gadget: legacy: fix an error code in eth_bind() (diff)
parentthunderbolt: Fix possible NULL pointer dereference in tb_acpi_add_link() (diff)
downloadlinux-81219f80097ea7616211dddca5438283a05816d4.tar.xz
linux-81219f80097ea7616211dddca5438283a05816d4.zip
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)