Skip to contentSkip to conversation

nvidiafb: Fix i2c error handling

PATCH In review Antonino A. Daplas 2 participants 3 messages Mar 6, 2005 – Mar 9, 2005 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 5/10 nvidiafb: Fix i2c error handling

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

---

 nv_i2c.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)
drivers/video/nvidia/nv_i2c.c +7 -1
diff -Nru a/drivers/video/nvidia/nv_i2c.c b/drivers/video/nvidia/nv_i2c.c
@@ -119,9 +119,12 @@
 	if (rc == 0)
 		dev_dbg(&chan->par->pci_dev->dev,
 			"I2C bus %s registered.\n", name);
-	else
+	else {
 		dev_warn(&chan->par->pci_dev->dev,
 			 "Failed to register I2C bus %s.\n", name);
+		chan->par = NULL;
+	}
+
 	return rc;
 }
 
@@ -174,6 +177,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

#1 lore raw

Could you tell me (and the list) what version of the source tree these patches are relative to? I do not think Linux 2.6.11 has merged nvidiafb yet.

I've been using:

Message-ID: <[email protected]>
From: "Antonino A. Daplas" <[email protected]>
Newsgroups: gmane.linux.fbdev.devel
Subject: [PATCH 6/7] nvidiafb: Add update framebuffer driver for nVidia chipsets
Date: Thu, 17 Feb 2005 20:45:36 +0800

and I presume the patches you are posting this week are on top of these but I was not sure hence this question.

-------------------------------------------------------
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

#2 lore raw
Quoted 3 lines · Junio C Hamano

Could you tell me (and the list) what version of the source tree these patches are relative to? I do not think Linux 2.6.11 has merged nvidiafb yet.

The diff is against 2.6.11-mm1.

Tony

-------------------------------------------------------
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