linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@hotpop.com>
To: linux-fbdev-devel@lists.sourceforge.net,
	Olaf Hering <olh@suse.de>,
	linux-nvidia@lists.surfsouth.com
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Re: 2.6.11-rc5, rivafb i2c oops, bogus error handling
Date: Mon, 28 Feb 2005 22:41:54 +0800	[thread overview]
Message-ID: <200502282241.55815.adaplas@hotpop.com> (raw)
In-Reply-To: <20050227203214.GA15572@suse.de>

On Monday 28 February 2005 04:32, Olaf Hering wrote:
>  On Wed, Feb 23, Linus Torvalds wrote:
> > This time it's really supposed to be a quickie, so people who can, please
> > check it out, and we'll make the real 2.6.11 asap.
>
> Here is another one, probably not new.
> Is riva_get_EDID_i2c a bit too optimistic by not having a $i2cadapter_ok
> member in riva_par->riva_i2c_chan? It calls riva_probe_i2c_connector
> even if riva_create_i2c_busses fails to register all 3 busses.
>

Thanks,

Can you try this?

Fixed error handling in rivafb-i2c.c if bus registration fails.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
---

 rivafb-i2c.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff -Nru a/drivers/video/riva/rivafb-i2c.c b/drivers/video/riva/rivafb-i2c.c
--- a/drivers/video/riva/rivafb-i2c.c	2005-01-13 03:57:12 +08:00
+++ b/drivers/video/riva/rivafb-i2c.c	2005-02-28 08:22:06 +08:00
@@ -120,8 +120,12 @@
 	rc = i2c_bit_add_bus(&chan->adapter);
 	if (rc == 0)
 		dev_dbg(&chan->par->pdev->dev, "I2C bus %s registered.\n", name);
-	else
-		dev_warn(&chan->par->pdev->dev, "Failed to register I2C bus %s.\n", name);
+	else {
+		dev_warn(&chan->par->pdev->dev,
+			 "Failed to register I2C bus %s.\n", name);
+		chan->par = NULL;
+	}
+
 	return rc;
 }
 
@@ -171,6 +175,9 @@
 		},
 	};
 	u8 *buf;
+
+	if (!chan->par)
+		return NULL;
 
 	buf = kmalloc(EDID_LENGTH, GFP_KERNEL);
 	if (!buf) {




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

  reply	other threads:[~2005-02-28 14:42 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.58.0502232014190.18997@ppc970.osdl.org>
     [not found] ` <20050224145049.GA21313@suse.de>
     [not found]   ` <1109287708.15026.25.camel@gaston>
     [not found]     ` <20050225070813.GA13735@suse.de>
     [not found]       ` <1109316551.14993.63.camel@gaston>
2005-02-25 17:29         ` 2.6.11-rc5 Olaf Hering
2005-02-25 17:59           ` [Linux-fbdev-devel] 2.6.11-rc5 James Simmons
2005-02-25 20:24             ` Olaf Hering
2005-02-25 21:21               ` [Linux-fbdev-devel] " Olaf Hering
2005-02-25 23:30                 ` Olaf Hering
2005-02-26  1:01                   ` Benjamin Herrenschmidt
2005-02-26  9:52                     ` Giuseppe Bilotta
2005-02-26  0:58                 ` Benjamin Herrenschmidt
2005-02-26  0:57               ` Benjamin Herrenschmidt
2005-02-26  0:54           ` 2.6.11-rc5 Benjamin Herrenschmidt
2005-02-26  0:41   ` 2.6.11-rc5 Olaf Hering
2005-02-26  0:49     ` 2.6.11-rc5 Linus Torvalds
2005-02-26  0:53       ` 2.6.11-rc5 Olaf Hering
2005-02-26  1:04         ` 2.6.11-rc5 Linus Torvalds
2005-02-26  1:08       ` 2.6.11-rc5 Buttchereit, Axel (XL)
2005-02-26  1:17         ` [Linux-fbdev-devel] " Benjamin Herrenschmidt
2005-02-26  1:13     ` 2.6.11-rc5 Benjamin Herrenschmidt
2005-02-26  7:41       ` [Linux-fbdev-devel] 2.6.11-rc5 Antonino A. Daplas
2005-02-27  8:07       ` 2.6.11-rc5 Geert Uytterhoeven
2005-02-27 20:32 ` 2.6.11-rc5, rivafb i2c oops, bogus error handling Olaf Hering
2005-02-28 14:41   ` Antonino A. Daplas [this message]
2005-03-01 12:02     ` [Linux-fbdev-devel] " Olaf Hering
2005-03-01 20:58     ` Olaf Hering

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=200502282241.55815.adaplas@hotpop.com \
    --to=adaplas@hotpop.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvidia@lists.surfsouth.com \
    --cc=olh@suse.de \
    /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).