Skip to content

Commit

Permalink
[PATCH] atyfb: Honor the return value of pci_register_driver
Browse files Browse the repository at this point in the history
Check return value of pci_register_driver().

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed Oct 3, 2006
1 parent 0a727de commit c1cc53b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/video/aty/atyfb_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -3863,6 +3863,7 @@ static int __devinit atyfb_setup(char *options)

static int __devinit atyfb_init(void)
{
int err1 = 1, err2 = 1;
#ifndef MODULE
char *option = NULL;

Expand All @@ -3872,12 +3873,13 @@ static int __devinit atyfb_init(void)
#endif

#ifdef CONFIG_PCI
pci_register_driver(&atyfb_driver);
err1 = pci_register_driver(&atyfb_driver);
#endif
#ifdef CONFIG_ATARI
atyfb_atari_probe();
err2 = atyfb_atari_probe();
#endif
return 0;

return (err1 && err2) ? -ENODEV : 0;
}

static void __exit atyfb_exit(void)
Expand Down

0 comments on commit c1cc53b

Please sign in to comment.