Skip to content

Commit

Permalink
ACPI, PCI, irq: remove redundant check for null string pointer
Browse files Browse the repository at this point in the history
source is decleared as a 4 byte char array in struct acpi_pci_routing_table
so !prt->source is a redundant null string pointer check. Detected with
smatch:

drivers/acpi/pci_irq.c:134 do_prt_fixups() warn: this array is probably
  non-NULL. 'prt->source'

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Colin Ian King authored and Rafael J. Wysocki committed Jan 5, 2016
1 parent 0971686 commit 4528897
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/acpi/pci_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,6 @@ static void do_prt_fixups(struct acpi_prt_entry *entry,
quirk = &prt_quirks[i];

/* All current quirks involve link devices, not GSIs */
if (!prt->source)
continue;

if (dmi_check_system(quirk->system) &&
entry->id.segment == quirk->segment &&
entry->id.bus == quirk->bus &&
Expand Down

0 comments on commit 4528897

Please sign in to comment.