diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-02-01 14:04:50 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-02-01 14:04:50 +0100 |
commit | 81219f80097ea7616211dddca5438283a05816d4 (patch) | |
tree | af60a87e8bec302088125fc4c9a0e46bc4add4e2 /drivers | |
parent | USB: gadget: legacy: fix an error code in eth_bind() (diff) | |
parent | thunderbolt: Fix possible NULL pointer dereference in tb_acpi_add_link() (diff) | |
download | linux-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.c | 2 |
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) |