mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ACPI, PCI, irq: remove redundant check for null string pointer
@ 2016-01-05 10:57 Colin King
  2016-01-08  0:45 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2016-01-05 10:57 UTC (permalink / raw)
  To: Rafael J . Wysocki, Len Brown, linux-acpi; +Cc: linux-kernel

From: Colin Ian King <colin.king@canonical.com>

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>
---
 drivers/acpi/pci_irq.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index c933675..d30184c 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -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 &&
-- 
2.6.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-08  0:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-05 10:57 [PATCH] ACPI, PCI, irq: remove redundant check for null string pointer Colin King
2016-01-08  0:45 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®