Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: pcie-check-and-return-bus_register-errors fix

__must_check goes on the declaration, not the definition.

Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Andrew Morton and committed by
Greg Kroah-Hartman
3ec6a8d0 09d6029f

+4 -3
+3 -1
drivers/pci/pcie/portdrv.h
··· 9 9 #ifndef _PORTDRV_H_ 10 10 #define _PORTDRV_H_ 11 11 12 + #include <linux/compiler.h> 13 + 12 14 #if !defined(PCI_CAP_ID_PME) 13 15 #define PCI_CAP_ID_PME 1 14 16 #endif ··· 41 39 extern int pcie_port_device_resume(struct pci_dev *dev); 42 40 #endif 43 41 extern void pcie_port_device_remove(struct pci_dev *dev); 44 - extern int pcie_port_bus_register(void); 42 + extern int __must_check pcie_port_bus_register(void); 45 43 extern void pcie_port_bus_unregister(void); 46 44 47 45 #endif /* _PORTDRV_H_ */
+1 -2
drivers/pci/pcie/portdrv_core.c
··· 6 6 * Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com) 7 7 */ 8 8 9 - #include <linux/compiler.h> 10 9 #include <linux/module.h> 11 10 #include <linux/pci.h> 12 11 #include <linux/kernel.h> ··· 400 401 pci_disable_msi(dev); 401 402 } 402 403 403 - int __must_check pcie_port_bus_register(void) 404 + int pcie_port_bus_register(void) 404 405 { 405 406 return bus_register(&pcie_port_bus_type); 406 407 }