Skip to content

Commit

Permalink
ide: ide_scan_pcibus(): check __pci_register_driver return value
Browse files Browse the repository at this point in the history
drivers/ide/setup-pci.c: In function 'ide_scan_pcibus':
drivers/ide/setup-pci.c:879: warning: ignoring return value of '__pci_register_driver', declared with attribute warn_unused_result

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Andrew Morton authored and Bartlomiej Zolnierkiewicz committed Jul 3, 2007
1 parent 8006bf5 commit d61bcce
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/ide/setup-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -872,11 +872,15 @@ void __init ide_scan_pcibus (int scan_direction)
* are post init.
*/

list_for_each_safe(l, n, &ide_pci_drivers)
{
list_for_each_safe(l, n, &ide_pci_drivers) {
list_del(l);
d = list_entry(l, struct pci_driver, node);
__pci_register_driver(d, d->driver.owner, d->driver.mod_name);
if (__pci_register_driver(d, d->driver.owner,
d->driver.mod_name)) {
printk(KERN_ERR "%s: failed to register driver "
"for %s\n", __FUNCTION__,
d->driver.mod_name);
}
}
}
#endif

0 comments on commit d61bcce

Please sign in to comment.