Skip to content

Commit

Permalink
Merge tag 'thunderbolt-for-v5.11-rc7' of git://git.kernel.org/pub/scm…
Browse files Browse the repository at this point in the history
…/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()
  • Loading branch information
Greg Kroah-Hartman committed Feb 1, 2021
2 parents 3e1f4a2 + 4d395c5 commit 81219f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/thunderbolt/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 81219f8

Please sign in to comment.