From: Dave Jones Date: Fri, 4 Nov 2005 23:32:08 +0000 (-0800) Subject: [AGPGART] Fix up sgi-agp bug with no devices on bus. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=146a209967886e57eb34b4cdb85ca52078a4f8cc;p=linux-beck.git [AGPGART] Fix up sgi-agp bug with no devices on bus. Signed-off-by: Eric Kunze Signed-off-by: Dave Jones --- diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c index d3aa159c9dec..53eeb293d174 100644 --- a/drivers/char/agp/sgi-agp.c +++ b/drivers/char/agp/sgi-agp.c @@ -288,6 +288,8 @@ static int __devinit agp_sgi_init(void) j = 0; list_for_each_entry(info, &tioca_list, ca_list) { struct list_head *tmp; + if (list_empty(info->ca_devices)) + continue; list_for_each(tmp, info->ca_devices) { u8 cap_ptr; pdev = pci_dev_b(tmp);