linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@gmail.com>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: Andrew Morton <akpm@osdl.org>, Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH 5/8 RESEND] atyfb: Honor the return value of pci_register_driver
Date: Thu, 10 Aug 2006 20:56:13 +0800	[thread overview]
Message-ID: <44DB2CED.60509@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.62.0608101410390.718@pademelon.sonytel.be>

Check return value of pci_register_driver().

Signed-off-by: Antonino Daplas <adaplas@pol.net>
---
Geert Uytterhoeven wrote:
> On Thu, 10 Aug 2006, Antonino A. Daplas wrote:
> 
> Actually it's a bit more complicated, as some Ataris do have PCI (although
> currently Atari Hades PCI support is broken).
> 

This one may be better.

Tony

 drivers/video/aty/atyfb_base.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index 053ff63..d6be4c7 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -3859,6 +3859,7 @@ #endif  /*  MODULE  */
 
 static int __devinit atyfb_init(void)
 {
+    int err1 = 1, err2 = 1;
 #ifndef MODULE
     char *option = NULL;
 
@@ -3868,12 +3869,13 @@ #ifndef MODULE
 #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)

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

      parent reply	other threads:[~2006-08-10 12:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-10 11:51 [PATCH 5/8] atyfb: Honor the return value of pci_register_driver Antonino A. Daplas
2006-08-10 12:11 ` Geert Uytterhoeven
2006-08-10 12:30   ` Antonino A. Daplas
2006-08-10 12:45     ` Geert Uytterhoeven
2006-08-10 12:56   ` Antonino A. Daplas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44DB2CED.60509@gmail.com \
    --to=adaplas@gmail.com \
    --cc=akpm@osdl.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).