rivafb: handle I2C bus creation failure
authorJean Delvare <khali@linux-fr.org>
Tue, 8 May 2007 07:38:18 +0000 (00:38 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 8 May 2007 18:15:28 +0000 (11:15 -0700)
I2C bus creation may fail, let rivafb handle that case properly.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/riva/fbdev.c

index a37189a227acf7d835ab608e048f58110c9b9054..b8d50f178ad5a3f12aa0c9ccbec1d7fc78009c0d 100644 (file)
@@ -1789,6 +1789,8 @@ static int __devinit riva_get_EDID_i2c(struct fb_info *info)
        NVTRACE_ENTER();
        riva_create_i2c_busses(par);
        for (i = 0; i < par->bus; i++) {
+               if (!par->chan[i].par)
+                       continue;
                riva_probe_i2c_connector(par, i+1, &par->EDID);
                if (par->EDID && !fb_parse_edid(par->EDID, &var)) {
                        printk(PFX "Found EDID Block from BUS %i\n", i);