PCI: fix bogus "'device' may be used uninitialized" warning in pci_slot
authorMatthew Wilcox <matthew@wil.cx>
Tue, 22 Jul 2008 18:37:17 +0000 (12:37 -0600)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 28 Jul 2008 22:06:00 +0000 (15:06 -0700)
I get warnings about 'device' possibly being used uninitialised.  While
I can deduce this is not true, it seems that GCC can't.  This patch
changes `check_slot' to return device on success and -1 on error, which
shuts GCC up.

Acked-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/acpi/pci_slot.c

Simple merge