From: Jean Delvare Date: Tue, 8 May 2007 07:38:18 +0000 (-0700) Subject: rivafb: handle I2C bus creation failure X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=5b358fe12f03a7822db6f376b608f996c664a952;p=openwrt%2Fstaging%2Fblogic.git rivafb: handle I2C bus creation failure I2C bus creation may fail, let rivafb handle that case properly. Signed-off-by: Jean Delvare Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index a37189a227ac..b8d50f178ad5 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c @@ -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);