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

SHPCHP: fix __must_check warnings

Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

+8 -4
+1 -1
drivers/pci/hotplug/shpchp.h
··· 173 173 #define msg_button_cancel "PCI slot #%s - action canceled due to button press.\n" 174 174 175 175 /* sysfs functions for the hotplug controller info */ 176 - extern void shpchp_create_ctrl_files (struct controller *ctrl); 176 + extern int __must_check shpchp_create_ctrl_files(struct controller *ctrl); 177 177 178 178 extern int shpchp_sysfs_enable_slot(struct slot *slot); 179 179 extern int shpchp_sysfs_disable_slot(struct slot *slot);
+5 -1
drivers/pci/hotplug/shpchp_core.c
··· 449 449 ctrl->speed = PCI_SPEED_33MHz; 450 450 } 451 451 452 - shpchp_create_ctrl_files(ctrl); 452 + rc = shpchp_create_ctrl_files(ctrl); 453 + if (rc) 454 + goto err_cleanup_slots; 453 455 454 456 return 0; 455 457 458 + err_cleanup_slots: 459 + cleanup_slots(ctrl); 456 460 err_out_release_ctlr: 457 461 ctrl->hpc_ops->release_ctlr(ctrl); 458 462 err_out_free_ctrl:
+2 -2
drivers/pci/hotplug/shpchp_sysfs.c
··· 91 91 } 92 92 static DEVICE_ATTR (ctrl, S_IRUGO, show_ctrl, NULL); 93 93 94 - void shpchp_create_ctrl_files (struct controller *ctrl) 94 + int __must_check shpchp_create_ctrl_files (struct controller *ctrl) 95 95 { 96 - device_create_file (&ctrl->pci_dev->dev, &dev_attr_ctrl); 96 + return device_create_file (&ctrl->pci_dev->dev, &dev_attr_ctrl); 97 97 } 98 98 99 99 void shpchp_remove_ctrl_files(struct controller *ctrl)